I don’t know where to post my problem in react native.
I have 3 screens. On my first screen I have a upload image button. After completed upload image I set a variabl with a new value. Then I want my second or third screen get the this value. is it possible?
Hey @tenh i am not an expert, just beginning with Expo.
But to my mind this question is more about React in general and what you are trying to achieve is totally what Redux offers.
If you don’t want to bother with full Redux you can try an implement Flux, which is supposed to be a bit easier when data stays skinny.
And of course if you don’t want to bother about any of these two, you can maybe store your information if the first common parent component and dispatch it as props to children.
For this one you will have to define the changing state function in the parent component and pass it along as props to children as well. Then every child will be able to execute a fonction that will change parent state.
I dont know if this trick is really clean or if it has any drawback but if your application stay really simple it is definitely something I would try.
I wish it could help a bit, good luck !
EDIT : You can have a look here, this is what I did to pass a markerPos prop to a map from my App component state (No redux or Flux just React)