You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have a firm grasp on exactly what is going on here, but each time I refresh the app in the iOS simulator using CMD-R, my render path callstack gets more and more complicated where certain screens are being initialized multiple times.
Here is a screen grab showing the difference between a fresh app load vs. two subsequent refreshes without changing any code or state:
Fresh start:
Refresh 1
Refresh 2
The callstack is getting so cumbersome that I had to reduce the font size just to get the entire screen captured.
Of particular worry are the fact that the constructors for HomeScreen and ActivityScreen are getting called more and more between each refresh. There should only be one instance of each of those screens. One of them is using react-refetch which means that each time those multiple instances are mounted, one network request is sent to my backend. That means that each refresh of the app adds more and more network requests until I get to the point where I'm slamming my dev server with multiple requests just to render a single screen 😱
If I had to guess, I'd say this could be related to #128 in that the previous navigation stack still exists and is being executed along with the new stack.
The "work around" is to stop the program in XCode and restart it. While this works, technically speaking, it obviously removes a nice feature of using React Native in the first place.
I don't have a firm grasp on exactly what is going on here, but each time I refresh the app in the iOS simulator using CMD-R, my render path callstack gets more and more complicated where certain screens are being initialized multiple times.
Here is a screen grab showing the difference between a fresh app load vs. two subsequent refreshes without changing any code or state:
Fresh start:
Refresh 1
Refresh 2
The callstack is getting so cumbersome that I had to reduce the font size just to get the entire screen captured.
Of particular worry are the fact that the constructors for
HomeScreen
andActivityScreen
are getting called more and more between each refresh. There should only be one instance of each of those screens. One of them is usingreact-refetch
which means that each time those multiple instances are mounted, one network request is sent to my backend. That means that each refresh of the app adds more and more network requests until I get to the point where I'm slamming my dev server with multiple requests just to render a single screen 😱If I had to guess, I'd say this could be related to #128 in that the previous navigation stack still exists and is being executed along with the new stack.
The "work around" is to stop the program in XCode and restart it. While this works, technically speaking, it obviously removes a nice feature of using React Native in the first place.
If it helps, I'm also using the Redux integration documented at http://airbnb.io/native-navigation/docs/guides/project-structure.html#integrating-with-redux
The text was updated successfully, but these errors were encountered: