I'm using react-navigation
and createStackNavigatior
to handle my navigation in the app.
In the main loading screen I use componentWillReceiveProps
to handle results coming from my reducer.
The problem occurs when I navigate away from the loading screen and whenever the same prop is updated in a different screen, the componentWillReceiveProps
is invoked in the main loading screen that I already navigated from although I expect it not to run at all.
Is there a way to disable that function from firing after it is supposed to be unmounted?