Type error when following Next.js guide #3052
-
Bug DescriptionWhile following this guide, I am getting this type error:
The error is resolvable by explicitly making the type argument to const storeRef = useRef<CounterStoreApi | null>(null); Reproduction Linkhttps://codesandbox.io/p/sandbox/mre-typeerror-when-following-zustands-next-js-guide-2mn5x2 |
Beta Was this translation helpful? Give feedback.
Answered by
dbritto-dev
Mar 14, 2025
Replies: 1 comment 2 replies
-
@mtilda seems is your config -> https://tsplay.dev/w2yzbW. btw, you could try changing this |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dbritto-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mtilda seems is your config -> https://tsplay.dev/w2yzbW. btw, you could try changing this
if (!storeRef.current)
toif (storeRef.current == null)