Connect
connect
HOC.
Connects the WrappedComponent to the module context.
connect(selectors: Map<Selectors>, actions: Map<ActionCreator>, options: Object)(Component: ReactComponent)
Params
selectors: Map<Selector> | null
The
selectors
that will consume the state from the parent module.Each key of the selectors Map will be injected as prop to the WrappedComponent.
actions: Map<ActionCreator> | null
Each key of the actions Map will wrapped into the module dispatch and injected as prop to the WrappedComponent.
options.pure: Boolean
If the Component is a functional component, wraps it in React.memo.
Default:
true
Component: ReactComponent
Component to be connected.
Return value
React Component with injected selector props, action props and the instanceId.