Navigation is use to navigate from one screen to diffrent screen
- Add static name in router_path.ts file inside mobile/src/navigation
class RoutePaths {
static screen: string = 'screen';
### New name to add here
static name : type = 'name'
}
- Add Your screen inside app_router.ts
<Stack.Navigator>
<Stack.Screen name={RoutePaths.screen} component={Screen} />
### New Screen you want to add
<Stack.Screen name={RoutePaths.screenname} component={your_screen_name} />
</Stack.Navigator>
- To navigate to diffrent screen.
- import useNavigaiton from @react-navigation/native
import {useNavigation} from '@react-navigation/native';
- create const for navigaiton as below.
const navigation = useNavigation()
- To navigate to diffrent screen on any event.
navigation.navigate("screen_name")