amin0
amin0

Reputation: 1

React Native/Expo: Event Emitter between screens; trigger refresh

I've scoured this site and various Github issues for a solution but am still a bit stuck. In essence, this is the flow that I desire:

  1. Land on first component/screen, which has some information
  2. Click a button and be pushed to a second component/screen
  3. Do something on this second component/screen
  4. Pop back to first component/screen
  5. Have refreshed information be displayed when we come back to this page

Issues:

Would greatly appreciate any help I can get. Thank you!

Upvotes: 0

Views: 1876

Answers (1)

Matt Aft
Matt Aft

Reputation: 8936

In the first component, create a function that will refresh the component by updating the state. Pass the function to the second component and when you pop, call this function.

Upvotes: 0

Related Questions