Screen is still runing even though I'm on another one (I don't get screen lifecycle) #11489
Unanswered
ArthurAnonyme
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using react native for my application, I'm trying to use redux to manage a state of an object (I get now that this is not optimal at all but I want an object I can access from multiple screens,If you have any other solution for this I'll be happy to listen ) : pool.
I'm navigating this way : "PoolDetails" (allows you to see and modify "pool") => "Home" => "PoolCreation" (before navigating to this screen I'm wiping the data in pool it's at this moment that it crashes.
The app crashes because some object is undefined (pool.pool_users.some(() => doSmth)) but on "PoolDetails". The easy solution is to put "?" where it's needed but it's tedious and should not be needed imo.
Is this normal behaviour is there a way to overwrite this behaviour and only having one screen executing a a time, cause I can see this becoming really fast a performance issue.
Beta Was this translation helpful? Give feedback.
All reactions