createContext and typescript
if i have context like this
and then in next _app doing something like
how should I type it correctly? now type of is any that's obviously bad right?
9 Replies
just type the context
Since you're in this server you should try zustand, cooler than context 😎
Since you're in this server, you shouldn't suggest people use technologies that they might not need simply based on whether it's cool or not
Zustand is a great replacement for context and provides a much simpler interface that would likely benefit them here, being cool was sarcasm
yeah ive heard of zustand but i want to learn typescript and basic react too @Pod
@iDarkLightning now i have error: on the

right, sorry my type was very wrong
is right I believe
👍
I might be remembering the setState type wrong, just hover over ur setState to see the right type