jamiebuilds / unstated-next

200 bytes to never think about React state management libraries ever again
MIT License
4.18k stars 145 forks source link

Why Unstated? #90

Open mbrahimi02 opened 4 years ago

mbrahimi02 commented 4 years ago

I'm just failing to understand why use unstated. The implementation looking at the source doesn't seem to do anything to add to the existing context API, no memoized selectors, no atomic API. So why is unstated so popular and what does it add?

AjaxSolutions commented 3 years ago

I'm just failing to understand why use unstated. The implementation looking at the source doesn't seem to do anything to add to the existing context API, no memoized selectors, no atomic API. So why is unstated so popular and what does it add?

I agree. This library is just a wrapper around the React context api which doesn't add any new functionality.

I like these three state management libraries better: Zustand, Valtio and Jotai.

https://github.com/pmndrs

jmayergit commented 2 years ago

I like these three state management libraries better: Zustand, Valtio and Jotai.

https://github.com/pmndrs

I looked into one of these libraries, Zustand, and the setup for Next.js is HUGE

https://github.com/vercel/next.js/blob/master/examples/with-zustand/lib/store.js

Sti2nd commented 3 months ago

Agreed. Use React Context; it has almost the exact same API as unstated-next. I guess unstated-next only exists because unstated existed, and maybe they look somewhat alike 🤷🏿