Want to get the state of current/active screens in memory and do some action in redux store app. Since onEnter/onExit doesn't support calling methods of the component(supports only Static methods calling using Actions.refs.SCENE_NAME.methodName).
Please provide a working example of the same.
Thanks a ton for taking effort in creating this awesome piece.
Yes, please we'd super appreciate a response on how to get this to work. Doesn't seem like anyone has gotten this working yet.
Anyone figure this out?
I don't use redux for our app, but mobx with wrapBy. Maybe it could be useful for MobX only.
Removed Redux from docs for wrapBy. Feel free to submit PR that allows easier Redux integration.
Ok, thanks for update. How would you recommend migrating from Switch?
Old syntax that handled the main auth routing:
component={connect(state => ({ profile: state.auth }))(Switch)}
selector={props => props.profile.user_id ? 'SignedIn' : 'onBoard'}
Thanks!
Did anyone figure out how to migrate from the old Switch syntax above (@richTheCreator ) to the new onEnter/onExit v4 approach? I can't figure it out and I'm upgrading my project to React 16.
Most helpful comment
Ok, thanks for update. How would you recommend migrating from
Switch?Old syntax that handled the main auth routing:
component={connect(state => ({ profile: state.auth }))(Switch)}selector={props => props.profile.user_id ? 'SignedIn' : 'onBoard'}Thanks!