panzerdp / dmitripavlutin.com-comments

7 stars 0 forks source link

react-jotai-state-management/ #112

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

A Guide to Jotai: the Minimalist React State Management Library

How to manage global state in React using the minimalist but flexible Jotai library.

https://dmitripavlutin.com/react-jotai-state-management/

vipinc007 commented 3 years ago

Thank you for showing us such a simple state management library. I was not aware of jotai and I now feel I should certainly use it in my project. Thanks for a nice article again

JacekLab commented 3 years ago

Hi Dmitri! I like your post. Wonder if you have any comments or have tried to make a comparison of bundle sizes of most popular global state mgmt libs? That would be very interesting.

panzerdp commented 3 years ago

Thank you for showing us such a simple state management library. I was not aware of jotai and I now feel I should certainly use it in my project. Thanks for a nice article again

@vipinc007 Thanks! Yes, I like Jotai too for its minimalistic design.

panzerdp commented 3 years ago

Hi Dmitri! I like your post. Wonder if you have any comments or have tried to make a comparison of bundle sizes of most popular global state mgmt libs? That would be very interesting.

Hi @JacekLab! Good idea about comparing the bundle sizes. I will think about it.

phutngo commented 3 years ago

Love your posts. This library seems so easy to use. A bit neater and simpler than useState with Context Provider.

I think I found a typo. In this expression: "const isEvenAtom = atom(get => get(baseAtom) % 2 === 0);". Should baseAtom be replaced with numberAtom?

panzerdp commented 3 years ago

@phutngo Thanks for letting me know. Fixed.

DanaCoding commented 2 years ago

Actually, Redux's thinking is good, but! It is too heavy, even with redux tookit, its underlying writing is still very heavy. Coupled with its complicated documentation, it is a maze for those who don't use it often. I used Redux a long time ago, and now it feels like a nightmare when I think about it. I think there are many options now, for example Zusand is also a good solution.

panzerdp commented 2 years ago

@DanaCoding I also think that Redux might be too verbose, but still I think it's a good library. I've heard good things about Zustand too, I should try it. :)

DanaCoding commented 2 years ago

Even so, because Redux is based on Proxy, for many developers, a slight error will cause performance degradation, especially when acting on React-Native. Of course, Zustan is also based on Proxy, so it is best not to use it in key performance code modules. The above is just my personal opinion :)

RegencySoftware commented 9 months ago

Very Helpful! Great Post!