Gathering detailed insights and metrics for react-navigation-helpers
Gathering detailed insights and metrics for react-navigation-helpers
Gathering detailed insights and metrics for react-navigation-helpers
Gathering detailed insights and metrics for react-navigation-helpers
react-navigation-redux-helpers
Redux middleware and utils for React Navigation
react-native-navigation-redux-helpers
Redux helpers for React Native navigation
react-navigation-mobx-helpers
React-Navigation bindings for MobX
react-navigation-browser-history-helpers
Helpers to make react-navigation have browser history.
npm install react-navigation-helpers
Typescript
Module System
Node Version
NPM Version
navigate helper type fix
Updated on Jul 10, 2023
feat: replace and jumpTo helpers 🍻
Updated on Jul 10, 2023
feat: Global Stack Navigator Events 😍
Updated on Aug 26, 2022
Better library itself 🥳
Updated on May 07, 2022
Version 2 is here 😍
Updated on Sep 17, 2021
Better Typescript Implementation 🥳
Updated on Apr 18, 2021
Java (31.46%)
JavaScript (24.91%)
TypeScript (20.45%)
Objective-C (15.47%)
Ruby (5.14%)
Starlark (2.07%)
Shell (0.51%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
61 Stars
1,694 Commits
6 Forks
2 Watchers
3 Branches
3 Contributors
Updated on Jun 30, 2025
Latest Version
2.3.1
Package Id
react-navigation-helpers@2.3.1
Unpacked Size
1.78 MB
Size
527.55 kB
File Count
100
NPM Version
9.5.1
Node Version
18.16.0
Published on
Jul 10, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Add the dependency:
1npm i react-navigation-helpers
Works with React Navigation
1"@react-navigation/native": ">= 4.x.x"
Version | Supported React Navigation Version |
---|---|
2.0.0 > | v6 |
1.1.1 | v5 |
< 0.1.0 | v4 |
Set the global level navigation reference into the NavigationContainer
1import { isReadyRef, navigationRef } from "react-navigation-helpers"; 2 3useEffect((): any => { 4 return () => (isReadyRef.current = false); 5}, []); 6 7<NavigationContainer 8 ref={navigationRef} 9 onReady={() => { 10 isReadyRef.current = true; 11 }} 12> 13 {/* Rest of your code */} 14</NavigationContainer>;
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.navigate("home");
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.push("home");
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.pop();
1import * as NavigationService from "react-navigation-helpers";
2
3NavigationService.popToTop();
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.back();
The usage does not change. Simply put your prop as the secondary prop as same as React Navigation itself.
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.navigate("home", { data: myData, myId: "d1f01df1" });
1import * as NavigationService from "react-navigation-helpers"; 2 3NavigationService.push("home", { data: myData, myId: "d1f01df1" });
1const { data, id } = this.props.route.params;
Property | Type | Default | Description |
---|---|---|---|
navigate | function | function | navigate the selected screen |
push | function | function | push the selected screen |
goBack | function | function | back the previous screen |
pop | function | function | pop the previous screen |
popToTop | function | function | pop the top level of the screen |
reset | function | function | reset the navigator |
To listen to the Stack navigator events from anywhere, you need to import navigationListenerProps
and spread it as props. It is currently limited to a single stack navigator.
1import { isReadyRef, navigationRef, navigationListenerProps } from "react-navigation-helpers"; 2 3useEffect((): any => { 4 return () => (isReadyRef.current = false); 5}, []); 6 7<NavigationContainer 8 ref={navigationRef} 9 onReady={() => { 10 isReadyRef.current = true; 11 }} 12> 13 <Stack.Navigator {...navigationListenerProps}> 14 {/* Rest of your code */} 15 </Stack.Navigator> 16</NavigationContainer>;
you can then listen to stack navigation events anywhere in your app.
Example in a component:
1import React, {useEffect} from "react" 2import {addNavigationListener} from "react-navigation-helpers" 3// or as a whole 4import * as NavigationService from "react-navigation-helpers"; 5 6const MyComponent = () => { 7 8 useEffect(() => { 9 return addNavigationListener("transitionEnd", () => { 10 // transition ended 11 }) 12 }) 13 14 // or like this 15 useEffect(() => { 16 return NavigationService.addNavigationListener("transitionEnd", () => { 17 // transition ended 18 }) 19 }) 20 21 return ( 22 <Text>Hello world!</Text> 23 ) 24}
FreakyCoder, kurayogun@gmail.com
React Navigation Helpers Library is available under the MIT license. See the LICENSE file for more info.
No vulnerabilities found.
Reason
13 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More