Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use wrapBy with Redux Store? #2423

Closed
Jayiitb opened this issue Sep 24, 2017 · 6 comments
Closed

How to use wrapBy with Redux Store? #2423

Jayiitb opened this issue Sep 24, 2017 · 6 comments

Comments

@Jayiitb
Copy link

Jayiitb commented Sep 24, 2017

Version

  • react-native-router-flux v4.0.0-beta.18 (v3 is not supported)
  • react-native v0.47.1

Expected behavior

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.

@paullinator
Copy link

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.

@richTheCreator
Copy link

Anyone figure this out?

@aksonov
Copy link
Owner

aksonov commented Oct 30, 2017

I don't use redux for our app, but mobx with wrapBy. Maybe it could be useful for MobX only.

@aksonov
Copy link
Owner

aksonov commented Oct 30, 2017

Removed Redux from docs for wrapBy. Feel free to submit PR that allows easier Redux integration.

@aksonov aksonov closed this as completed Oct 30, 2017
@richTheCreator
Copy link

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!

@tmaly1980
Copy link

tmaly1980 commented Apr 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants