Skip to content

Commit

Permalink
fix: don't throw on setParams on ref
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Feb 28, 2024
1 parent 901cd11 commit b99d3c3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions packages/core/src/BaseNavigationContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ export const BaseNavigationContainer = React.forwardRef(
getCurrentRoute,
getCurrentOptions,
isReady,
setParams: () => {
throw new Error('Cannot call setParams outside a screen');
},
setOptions: () => {
throw new Error('Cannot call setOptions outside a screen');
},
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,6 @@ export type NavigationContainerRef<ParamList extends {}> =
* Stub function for setOptions on navigation object for use with useNavigation.
*/
setOptions(): never;
/**
* Stub function for setParams on navigation object for use with useNavigation.
*/
setParams(): never;
/**
* Stub function for getParent on navigation object for use with useNavigation.
*/
Expand Down

0 comments on commit b99d3c3

Please sign in to comment.