I\'ve got a problem with the navigation of React Navigation and React Native. It is about resetting navigation and returning to the home screen.
I\'ve build a StackN
You can use StackActions.replace
in this version
import { StackActions } from '@react-navigation/native';
navigation.dispatch(
StackActions.replace('Home', { test: 'Test Params' })
)
import * as React from 'react';
import { View, Button, Text } from 'react-native';
import { NavigationContainer, StackActions } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
function SplashScreen({ navigation }) {
return (
SPLASH SCREEN!