redux-loader
redux-loader copied to clipboard
When resource find returns null, infinite busy loop occurs.
return {
id,
load() {
const action = actions.fetchOne(ePId);
return options.dispatch(action);
},
find() {
// if I mess up the prop name (e.g. engagement_packages) the loader component will get stuck in an infinite loop instead of rendering the component.
return _.find(options.props.engagementPackages, {id: ePId});
},
};
Published 0.4.2. This will show a console warning if find returns null.