frint-props: create `withStore`
fahad19 opened this issue · 0 comments
fahad19 commented
This function will take care of getting the store
provider (which can either be a frint-store
or Redux store instance), and map its state and dispatchable actions accordingly:
Expected API usage
withStore(
mapStateToProps,
mapDispatchToProps,
storeProviderName = 'store'
appName = null
)
mapStateToProps
: Function that accepts state tree object, and returns props-compatible objectmapDispatchToProps
: Accepts action creators, and returns object keyed by their names, dispatching to StorestoreProviderName
: Optional, and defaults tostore
appName
: Optional, defaults tonull
which means it will get the Store from the App instance in scope. Otherwise it will try to get another Child App by its name provided as string.