react-navigation stack navigation without initial screen? (from a button) - react-native

We are using a different router for our app (react-router)
We are integrating react-navigation in some screens of our app.
(For example, we can adapt react-navigation for user profiles related screens)
Now, we have new requirements, where we want to use react-navigation from a button of an existing screen (which is not part of react-navigation)
Say you have a screen where there is a button which will create a new screen (stack a new screen). I want the navigation from the existing screen to new screen handled via react-navigation.

Related

React native container subpages navigation

I am creating a React native application with the following scenario:
There is a navigation bar at the bottom of the screen, allowing the user to navigate between three main pages. On one of these pages, there is a backdrop with a container overlayed on it with two buttons. Each of these buttons should show open different "pages" in that container, and the navigation bar will be hidden when the user opens one of those "pages". An image is included below.
App layout example
My question is: how is this best implemented in react native?
My original idea was to implement a custom Stack Navigator with createStackNavigator. While this does work, I was wondering if this is a good way to go about it.
One result from using a custom navigator is that the navigation state in the container is also bound to the back button of the device (on Android). However, this is a welcome feature in this case as it makes sense in the navigation flow.

How to open a screen from another screen which was already opened from a another screen?

So I have a React Native app with a bottom tab navigation, in one of those tab screens I have an icons in the right header which leads me to a settings screen and for this I use stackNavigation but I also want to open another screen from this Settings screen - Account screen. How do I achieve this? Do I just use stack navigation again?

Navigation using react native

I'm new in react native and I'm looking for an example of react navigation. I'm looking to create a home page similar to the picture below.
Use React Navigation
Stack Navigator - It let's you switch between screens. It creates a stack. It let's to navigate from one screen to another. When you press back button it navigates you back to the first screen. It
Tab navigator- It will create tabs as your picture.
In your case I think you will need a tab navigator which will be inside stack navigator.

How to insert new scene on pop stack in react native?

I am working on existing react native project and I want to find solution for pop action on navigation stack where I want to introduce new scene which is actually not on stack.
I have three different type of route based on state of user logged In, logged out or in locked state. So while user's app state is locked at that time on launch I am directing user to reset account page from launch scene.
Launch Scene -> Reset Account
But on back event of Reset Account, I want to show login page instead of Launch scene, but Login scene is not in stack as of now.
So how to insert new scene when user performs pop action ?
I am new to react native and I don't know how to modify navigation stack programmatically without performing any animation ?
In my project there is one package named react-native-router-flux to handle react navigation.
Any insight will be helpful.
I suggest you create a SwitchNavigator between LaunchScreen and AccountStack
AccountStack is a StackNavigator that render both:
LoginScreen.
ResetAccountScreen. << This would be your initialRoute.

React Navigation navigate and scroll

I'm using the StackNavigator from react-navigation and I'm trying to customize the navigation process.
On one screen, I have two buttons that both use the "navigate" function to redirect the user to the same screen (which is a scrollview). Is there any way to have one of the buttons scroll down to a different part of the screen after navigating?