mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
Fix type in nextjs.md (#2530)
There are two typos in the error message argument. `useCounterStore must be use` => `useCounterStore must be used`
This commit is contained in:
parent
e74fdc8bc9
commit
9d24d11e1e
@ -142,7 +142,7 @@ export const useCounterStore = <T,>(
|
||||
const counterStoreContext = useContext(CounterStoreContext)
|
||||
|
||||
if (!counterStoreContext) {
|
||||
throw new Error(`useCounterStore must be use within CounterStoreProvider`)
|
||||
throw new Error(`useCounterStore must be used within CounterStoreProvider`)
|
||||
}
|
||||
|
||||
return useStore(counterStoreContext, selector)
|
||||
@ -235,7 +235,7 @@ export const useCounterStore = <T,>(
|
||||
const counterStoreContext = useContext(CounterStoreContext)
|
||||
|
||||
if (!counterStoreContext) {
|
||||
throw new Error(`useCounterStore must be use within CounterStoreProvider`)
|
||||
throw new Error(`useCounterStore must be used within CounterStoreProvider`)
|
||||
}
|
||||
|
||||
return useStore(counterStoreContext, selector)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user