2

I have created a react native app, combined with Redux. I am storing user token, in async storage. So when user click on logout , i am removing the token.

What I need is , how to restart or refresh the whole app, when user presses on Logout. For example, while in development mode we can shake the phone and press on reload to reload the app right ? Like wise, how to reload the app pragmatically inside the application ?

One, way i did was. I used callback in action and reset the stack using React Navigation. But, i felt bad about using callback from action and resetting the stack.

Is there any good way to reload the app or refresh the app from the begging ? As many apps just restarts when people presses on LogOut !

Please guide.

Tiago Ornelas
  • 1,109
  • 8
  • 21
Arvindh
  • 600
  • 1
  • 10
  • 25

0 Answers0