The user will stay on the current route (scene) when a system dialog pops up.
When a user accesses some features for the first time, like the camera, iOS will pop up a system dialog asking for permission to use the resource. When that dialog pops up, react-native-router-flux navigates to the default route. This is, of course, not desired.
Damn... This one is dangerous!
Facing the same issue.. even when the keyboard pops up, navigated to the root scene!
@handoff Did you find a solution for this?
Facing the same issue, any solution for both android and IOS
@MosesEsan @kamleshsindhal08 - I found a workaround. The problem is that the router component gets re-rendered, right? So in your router component class add this method:
class RouterComponent extends Component {
...
shouldComponentUpdate() {
return false;
}
...
render() {
return (
<Router>
...
</Router>
...
@MosesEsan @kamleshsindhal08 - I found a workaround. The problem is that the router component gets re-rendered, right? So in your router component class add this method:
class RouterComponent extends Component { ... shouldComponentUpdate() { return false; } ... render() { return ( <Router> ... </Router> ...
Many thanks. After two days of efforts, this solved the issue. Phew!
Most helpful comment
@MosesEsan @kamleshsindhal08 - I found a workaround. The problem is that the router component gets re-rendered, right? So in your router component class add this method: