Details
-
Story
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
-
-
Empty show more show less
-
DevX 44, DevX 45
-
5
-
Yes
Description
Besides react built-in context (React.createContext()), supports another way by using a global singleton that can share data between components:
- Consider moving unchanged data in 1 js singleton (componentMappings, fallbackComponent, devMode)
- And easy changed data in another js (content from page, templateAnnotations)
AC: Check and update all sample spa project that used EditorContext.js
Reference code: ComponentConfig.js, ContextSingleton.js from propsal PR: https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/pull-requests/220/diff#samples/next-js-13-with-react-editor-new/packages/react-editor-2/src/utils/ContextSingleton.js
Checklists
Acceptance criteria
Attachments
Issue Links
- to be documented by
-
MGNLFE-628 DOC: Describe React SharedContext
-
- Closed
-
There are no Sub-Tasks for this issue.