Create Context
createContext
HOC.
Creates a redux-mvc context, making the module’s store available to the children.
createContext(definition: Definition)(Component: ReactComponent)
Usage
Creates a context, runs the module and makes the context available.
const Page = createContext({module})(PageLayout)
Parameters
Definition = {module: ModuleInterface,persist?: Boolean,contextId?: String | Symbol}
module: ModuleInterface
The module to be executed in the context.
persist?: Boolean
Persists the store object when unmounted.
Default:
true
contextId?: String | Symbol
Id where the store object will be persisted.
Default:
Symbol("contextId")
Return value
React Component that is a Provider of the context.