Nothing here yet.
Nothing here yet.
Flow-typed props are superior in almost every way to the built PropTypes. The only drawback that you might have is that FlowType is still not well known, so people reading your code might be confused by some FlowType notations.
Hi! The easiest option would be storing the error in Redux and showing the alert in componentDidUpdate when you detect that it has changed: componentDidUpdate (prevProps) { if (!prevProps.error && this .props.error) { // show the alert } } Another option is invoking directly the alert directly from redux-thunk (I'm assuming you're using it for handling the fetching). An even cleaner solution though (in my opinion) is achieved using something like redux-saga for triggering the side effect (the alert) when an error action is dispatched. P.S.: Let me know if you need any example of the suggestions above :)