Prevent react component from rendering twice when using redux with componentWillMount
One thing you might do is create a higher order component that handles the basic pattern of loading a different component (or no component) before the required props are loaded. export const LoaderWrapper = function(hasLoaded, Component, LoaderComponent, onLoad) { return props => { if (hasLoaded(props)) { return <Component {…props} /> } else { if (onLoad) … Read more