Search code examples
react-nativereact-native-router-flux

react-native-router-flux navigating to same scene


Is there a way to navigate to the scene that the user is currently on? Almost the equivalent of refreshing the component?

I have a reusable component called ProfileScreen, which shows a user's profile. That user, by default, is the logged in user; but it can also be a user that they select on a different screen.

The problem is that if the user is on another user's profile, and tries to navigate (via Drawer) to their own profile, it does nothing. I've tried obfuscating the navigation actions inside of redux functions to no avail.

Right now I'm having it navigate briefly to a "Loading" component before navigating back to the profile scene, but this is far from an optimal solution.

Any thoughts?


Solution

  • Actions.refresh() will do the job