In React Navigation, screens seem to persist even after changing the screen. However, in React Native Navigation, all the screen appear to be refreshed after getting focused again, making it hard to persist data and lowering the user experience especially when using FlatList. Thus, I wonder whether there was a method to prevent this. Thanks!
RNN only renders screens once when they are created. Any other additional render is guaranteed to be caused by a call to setState
in JS.
Perhaps you're listening to the componentDidAppear
event and calling setState
from there. Doing so will trigger a rerender each time a screen reappears.