|
|
|
|
|
by Telichkin
2610 days ago
|
|
When I started a new React-project at my work, I asked myself: "Why do I need any external dependencies for state management such as Redux or MobX? What functionality from this dependencies do I need in the first place?". I realised that I just want to have many views connected to one dataset, and I want to re-render all connected views when dataset was changed. This is a simple pub-sub pattern which everyone can implement himself. So, I implemented it myself in just 65 lines of code. I use this solution in production for 6 months and don't see any drawbacks. What are the advantages of Redux or MobX over this solution? |
|
What are the advantages of this solution over features already in React (no need of Redux) such as context and the reduce hook?