Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Example how to implement with new API (https://github.com/react-navigation/react-navigation-redux-helpers/tree/2.0) #39

Closed
mrikirill opened this issue Jun 14, 2018 · 10 comments

Comments

@mrikirill
Copy link

Hi 馃憢

Is there any example about how to implement react-navigation with new API ?
React-navigation docs provides the instruction only for the previous version

@Ashoat
Copy link
Member

Ashoat commented Jun 14, 2018

The PR to update the official React Navigation docs hasn't been merged yet. Here's the deploy preview.

@mrikirill
Copy link
Author

Thanks @Ashoat
Would you recommend to update right now or wait till the official React Navigation doc will updated ?

@Ashoat
Copy link
Member

Ashoat commented Jun 14, 2018

There was a small bug in 2.0.0, but should be fixed now. You can go ahead and update right now to 2.0.1!

@mrikirill
Copy link
Author

Ok thanks @Ashoat I will update my app

@ViktorAksionov
Copy link

Example above doesn't work, also this

Some folks like to have their navigation state stored in the same place as the rest of their application state. Think twice before you consider doing this, there is an incredibly good chance that you do not need to do this!. Storing your React Navigation state in your own Redux store is likely to give you a very difficult time if you don't know what you're doing, and support for Redux integration is being depreacted.

is too bold statement. If you did not develop large app where you need to have strict control on each user move then without redux integration it will be easier just to abandon react-navigation and to move to other libs. Please don't be selfish person!

@Ashoat
Copy link
Member

Ashoat commented Jun 14, 2018

@YounetBet, I have no idea what you're talking about.

@ViktorAksionov, you're really calling open source volunteers selfish? Anyways, I didn't write that chunk. You can provide feedback on it here. For reference, the "deprecated" chunk is going away.

@proutek
Copy link

proutek commented Jun 14, 2018

Updated documentation states:
"4. A middleware is needed so that any events that mutate the navigation state properly trigger the event listeners. To properly trigger the event listeners with the initial state, a call to initializeListeners is also necessary."

I have updated my project according to documentation but in example there is no explicit call to initializeListeners. I assume it is done in reduxifyNavigator now.

I'm asking because I have now problems with didFocus event which is not called.

@avorona
Copy link

avorona commented Jun 14, 2018

@Ashoat thanks for the link to the preview, I have needed it a couple hours ago and you had brought it in time

@Ashoat
Copy link
Member

Ashoat commented Jun 14, 2018

@proutek: Oops, that should be fixed! initializeListeners is deprecated in 2.0.

@Ashoat
Copy link
Member

Ashoat commented Jun 15, 2018

Docs are merged now.

@Ashoat Ashoat closed this as completed Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants