with-load-data
v1.1.1
Published
Send redux action to load data, and then wait loading component until check function return true
Maintainers
Readme
HOC withLoadData
Send Redux action to load data, and return null instead wrapped Component until check function returns true
Usage:
withLoadData({
actionLoadData,
checkIsDataLoaded,
})(Component)- HOC connect component to Redux
store actionLoadData({ componentProps })will bind to redux dispatch, so it can be regular Redux action and pass component props to actioncheckIsDataLoadedreceivestateas a param, so we have access to redux state
