DEV Community

Discussion on: React doesn't need state management tool, I said

Collapse
 
alanxtreme profile image
Alan Daniel

Recoil ftw

Collapse
 
benstov profile image
benstov • Edited

Check out recoil on bundle phobia, i wouldn't use it with how much it weights, unless your website shouldn't appear on Google.
Bundle size is important, and there is a reason why recoil is in experimental state.

If they could make it weigh 2kb I might consider it.

Collapse
 
bennodev19 profile image
BennoDev • Edited

Recoil is heavy, but it also saves you from writing a lot of boilerplate code.
However, there are also lightweight (tree-shakable) alternatives
with a similar approach.

Collapse
 
stepan662 profile image
Štěpán Granát

I haven't used recoil yet. But from documentation it feels like it's a bit more complicated. I tried to keep it simple and similar to React.Context API. But I guess it has very similar use case ...

Collapse
 
zachbryant profile image
Zach

Imo using it feels way simpler than context. Different api than context, but very very little setup involved