Methods
module:react-cmf/lib/App(props) → {object}
The React component that render your app and provide CMF environment.
Parameters:
Name | Type | Description |
---|---|---|
props |
object | { store } |
Returns:
ReactElement
- Type
- object
module:react-cmf/lib/cmfConnect(options) → {ReactComponent}
this function wrap your component to inject CMF props
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Option objects to configure the redux connect |
- Source:
Returns:
- Type
- ReactComponent
Examples
The following props are injected:
- props.state
- props.setState
- props.initState (you should never have to call it your self)
- dispatch(action)
- dispatchActionCreator(id, event, data, [context])
support for the following props
- initialState (called by props.initState)
- didMountActionCreator (id or array of id)
- willUnMountActionCreator (id or array of id)
- componentId (or will use uuid)
- keepComponentState (boolean, overrides the keepComponentState defined in container)
- didMountActionCreator (string called as action creator in didMount)
- view (string to inject the settings as props with ref support)
- whateverExpression (will inject `whatever` props and will remove it)
options has the following shape:
{
componentId, // string or function(props) to compute the id in the store
defaultState, // the default state when the component is mount
keepComponent, // boolean, when the component is unmount, to keep it's state in redux store
mapStateToProps, // function(state, ownProps) that should return the props (same as redux)
mapDispatchToProps, // same as redux connect arg, you should use dispatchActionCreator instead
mergeProps, // same as redux connect
}
module:react-cmf/lib/deprecated(fn, msg, log) → {any}
display a deprecated message on the first call of a function.
Parameters:
Name | Type | Description |
---|---|---|
fn |
function | the function to deprecate |
msg |
String | the message to display |
log |
function | [description] |
- Source:
Returns:
the content of fn;
- Type
- any
Type Definitions
Context
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
store |
string | |
registry |
string |
- Source: