Slide 39
Slide 39 text
const context = useProductContext();
console.log("context: " + JSON.stringify(context));
{
"accountId": {accountId},
"accountType": "licensed",
"cloudId": {cloudId},
"contentId": "393217",
"localId": {localId},
"spaceKey": "~557057729b34f7b3a34dda9883b1b9ed7dc794",
"installContext": “{installContext}”,
"isConfig": false,
"extensionContext": { "type": "macro", "isEditing": false, "references": [] },
"moduleKey": "confluence-page-ring-macro-hello-world"
}
console.log("context.contentId: " + context.contentId);
393217
Docs: https://developer.atlassian.com/platform/forge/ui-kit-hooks-reference/