Closed LarryKlugerDS closed 6 years ago
Hey @LarryKlugerDS,
So you are actually looking for a way to show an alert based on a prop update.
I would recommend you to do it in the componentDidUpdate
lifecycle (the way you are doing it also works, but componentWillReceiveProps
is not recommended anymore, see here).
Hope it helps!
Thank you and congratulations on the project, it is great!
A question: I want one of my Redux actions to show an alert.
Currently, my Redux action sets a Redux property, then a component, in its
componentWillReceiveProps
method:this.props.alert.show
This is all working fine, but is there a more direct way for an action to call alert.show?
Many thanks, Larry