Skip to content

Commit 353115b

Browse files
committed
fix: params argument is optional now
1 parent c41dcea commit 353115b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/NavigationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { StackActions } from "@react-navigation/native";
44
export const isReadyRef = React.createRef();
55
export const navigationRef = React.createRef();
66

7-
export const navigate = (routeName: string, params: any) => {
7+
export const navigate = (routeName: string, params?: any) => {
88
if (isReadyRef.current && navigationRef && navigationRef.current) {
99
// Perform navigation if the app has mounted
1010
navigationRef?.current.navigate(routeName, params);
1111
}
1212
};
1313

14-
export const push = (routeName: string, params: any, ...args: any) => {
14+
export const push = (routeName: string, params?: any, ...args: any) => {
1515
if (isReadyRef.current && navigationRef && navigationRef.current) {
1616
// Perform navigation if the app has mounted
1717
navigationRef.current.dispatch(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-navigation-helpers",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Easy to use React Navigation with these helpers for React Navigation on React Native",
55
"keywords": [
66
"v5",

0 commit comments

Comments
 (0)