A lib for fetching normalized data in a redux store through sagas.
Basic Usage
You need to install a redux-saga setup with the watchDataActions and the data reducer:
const sagaMiddleware = const storeEnhancer = { } const rootReducer = const store = sagaMiddleware
Then you can request data from your api that will be stored in the state.data
{ super thisstate = error: null } { const dispatch = thisprops } { const foos = thisprops const error = thisstate if error return error return <Fragment> foos </Fragment> } { return foos: statedatafoos } mapStateToPropsFoo
NOTE: We could also used a handleSuccess in the requestData api, in order to grab the action.data foos in that simple case:
{ thisstate = error: null foos: } { const dispatch = thisprops } { const error foos = thissetState ...}
But if your rendered foos array should be coming from a memoizing merging (and potentially normalized) (and potentially selected from inter data filter conditions) state of foos, then syntax goes easier if you pick from the connected redux store lake of data.
Usage with config
See all the possible config for requestData in the fetch-normalize-data doc.