@react-navigation/core 7.12.0 → 7.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  export function useNavigationState(selector) {
14
14
  const stateListener = React.useContext(NavigationStateListenerContext);
15
15
  if (stateListener == null) {
16
- throw new Error('useNavigationState must be used within a NavigationStateListenerProvider');
16
+ throw new Error("Couldn't get the navigation state. Is your component inside a navigator?");
17
17
  }
18
18
  const value = useSyncExternalStoreWithSelector(stateListener.subscribe,
19
19
  // @ts-expect-error: this is unsafe, but needed to make the generic work
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/core",
3
3
  "description": "Core utilities for building navigators",
4
- "version": "7.12.0",
4
+ "version": "7.12.1",
5
5
  "keywords": [
6
6
  "react",
7
7
  "react-native",
@@ -82,5 +82,5 @@
82
82
  ]
83
83
  ]
84
84
  },
85
- "gitHead": "0eea403da627af2624d8dc0d985d00d92c79f569"
85
+ "gitHead": "c059915c187967137f33b8931e6badcb0c604492"
86
86
  }
@@ -21,7 +21,7 @@ export function useNavigationState<ParamList extends ParamListBase, T>(
21
21
 
22
22
  if (stateListener == null) {
23
23
  throw new Error(
24
- 'useNavigationState must be used within a NavigationStateListenerProvider'
24
+ "Couldn't get the navigation state. Is your component inside a navigator?"
25
25
  );
26
26
  }
27
27