using states in a react-navigation without redux - react-native

as written in the react-navigation page:
Warning: in the next major version of React Navigation, to be released in Fall 2018, we will no longer provide any information about how to integrate with Redux and it may cease to work.
In the next version of react-navigation it could be hard to use redux with react-navigation.
My question is: what can I do to use states (and passing states between screens) in a react-navigation app without using redux?

For children of navigator
react-navigation gives you an withNavigation HOC, so you can easily wrap the component inside it to access the navigation state and navigate.

Why you integrate react navigation with redux?
For me, I want to be able to perform navigation actions from outside of my components(screens). Eg: Redux-saga. If we don't integrate, we can't navigate via redux-saga.
For a task like that we don't need to integrate react-navigation and redux. We just need to use NavigationService.

Related

React Native Navigation Syntax

What is the difference between using navigation.navigate() and navigation.dispatch(CommonAction.navigate()) in React Native?
The docs explanation is:
The dispatch method lets us send a navigation action object which determines how the navigation state will be updated. All of the navigation functions like navigate use dispatch behind the scenes.
https://reactnavigation.org/docs/navigation-prop/#dispatch
AFAIK there is no real difference between using actions and navigate

Is nested routing possible in react-native?

I am using react-router-native for routing. Usually when ever new route is pushed to history the current screen will be unmounted and new screen is mounted. But As per documentation nested routing is possible in web. They haven't mentioned anything about mobile.
I just want to know if nested routing is possible react-native as I want two routes to be active at a time.
Thank You.
in case of React Native use React navigation https://reactnavigation.org/ and its stack routing in case of mobile development where you mount a new view by navigate() and unmount by goback() to history
ref - https://reactnavigation.org/docs/en/stack-navigator.html

React native navigation which is the best solution

Which navigation is best to use in react native with redux
react navigation
react native navigation
react native router flux
Is here anything best rather than this ?
I would go with react navigation for redux. It is pretty easy, there is a good number of tutorials as well as their documentation I would say is pretty clear: https://reactnavigation.org/docs/en/redux-integration.html
You should give the Navigation router a try. It provides 100% native navigation on iOS and Android. It doesn’t require you to do anything special to integrate with Redux. Wrap the top level component in a Redux Provider component and away you go. I’ve written a Redux example to get you started
React-Navigation itself answers your question here

React-navigation parent to child transition

I want to implement a parent to child transition in a FlatList (in a StackNavigator with a DrawerNavigator as root).
I see react-navigation have custom Transitioner. That could be the way to accomplish that. This article (april 2017) is a tutorial to do exactly that, but it needs some native customization.
I'm currently in Expo env, so I cannot do it. There is an alternative way to accomplish this transition in react-navigation?

React Navigation and redux: two dispatches?

I am developing a React Native app using React Navigation and redux. I have been reading countless questions dancing around the proper way to implement the two libraries. My question is: Is there any relationship between navigation.dispatch() and redux’s dispatch()?
To be clear if I implement React Navigation with redux as described in the redux integration section could I dispatch other non-navigation actions through navigation.dispatch? This stems from trying to dispatch a logout action from a header button attached to a TabNavigator (as a child of a StackNavigator). Trying to access redux’s dispatch inside this header seems quite tricky.