You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if I am against any repo rule, I hope not so I try anyway.
I am trying to use the onEnter property in the Scene. What I am trying to do is to check if an user is authenticated per Scene, if not redirect to Login page.
I am doing something like this, in the App.js component:
I don't know if this will solve your problem. onEnter needs a function reference, while you gave it this.isLogged(isAuth) which resolves to undefined (which is not a function).
Try this: onEnter={() => this.isLogged(isAuth)}. Note, it is unclear what isAuth is or if it's even in scope.
@ryanmr Thank you for the answer. It was my fault in the upper code.
The only problem I get now is that the isAuth prop (is a value that I set in the store/persist) is not received as true when moving from Login to Home when I log in.
Hi,
I don't know if I am against any repo rule, I hope not so I try anyway.
I am trying to use the
onEnter
property in theScene
. What I am trying to do is to check if an user is authenticated perScene
, if not redirect to Login page.I am doing something like this, in the
App.js
component:Unfortunately when I execute this code, I get back this error:
TypeError: _reactNativeRouterFlux.Actions.Login is not a function
Any help on this would be more than welcome.
Version
The text was updated successfully, but these errors were encountered: