Hello, I'm Mohammad, the individual behind this blog! I am the founder of Tinylibs and a maintainer of Vitest, Jotai, Valtio, along with a few other libraries.
Thank you, Fang, you made my day. Yes, you can use this approach, And I use it in my projects. Or you can use the better version of it, which we work on, jotai. github.com/pmndrs/jotai
The store lives in a simple object, but we attach some useStates to it basically when we use uMS, so when it changes, we call those useStates(setStates) in the components. So no wasteful renders like React Context. Just your subscribed component is going to be changed.
Hello, I'm Mohammad, the individual behind this blog! I am the founder of Tinylibs and a maintainer of Vitest, Jotai, Valtio, along with a few other libraries.
Yes, I appreciate it. I recommend you take a look at the simulated version which I gave the link in the article. It's a good alternative to the experimental one.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you, Fang, you made my day. Yes, you can use this approach, And I use it in my projects. Or you can use the better version of it, which we work on, jotai.
github.com/pmndrs/jotai
The store lives in a simple object, but we attach some useStates to it basically when we use uMS, so when it changes, we call those useStates(setStates) in the components. So no wasteful renders like React Context. Just your subscribed component is going to be changed.
github.com/reactjs/rfcs/blob/maste...
github.com/reactwg/react-18/discus...
thanks for the quick reply man, i actually came from the RFC page :)
will take a close look at article you forwarded and jotai. Always interested at some localized version of redux. Thank you.
Yes, I appreciate it. I recommend you take a look at the simulated version which I gave the link in the article. It's a good alternative to the experimental one.