+ 7
Front end web developer (React.js)
Hello SL community. Please share your awesome tools, extensions and libs, which you use at your work. Do you use Redux-thunk or Redux-saga and why ? Do you use context-api, redux or mobix and why ? Thanks for attention 🛠
5 odpowiedzi
+ 11
No problem
Hoping to see more React developers sharing information 😎
+ 9
One rather large project that i am working on uses redux and redux-thunk, but we recently started developing new features in it using MobX as state management.
I was kind of skeptic at first about using two state management libraries, especially in regard of data sharing, but most of the systems does not require shard data + using MobX really started speeding up the development process.
+ 7
With redux it came to that we needed a container file, actions file, reducer file and a selectors file.
The data flow was quite complex sometimes.
And with mobx it became much simpler:
A single store/actions file (usually one file for feature/system)
The store data and all the actions are contained in one file => the specific feature file.
Data mutation is much simlpler since with mobx you can use regular assignment.
We also use decorators to inject the store as props which is very convenient.
The main headache i had with mobc so far was re-rendering issues that originated from the way mobx works.
Those are usually solved by breaking down the code to more components or wrapping components with a mobx observer wrapper.
We use many 3rd party libraries for this project, and i can't really think of interesting ones.
Mainly components such as react-select, day pickers, and some more.
+ 6
Burey thanks for the answer :)
+ 2
Hmm.. interesting, so what's the reason to choose MobX instead of Redux ? , less code ? or more speed or smth else ?, because MobX has a lot of headaches...), about 2 state management types, we have 3 😃, we also use context api in some containers.
And what about tools extensions and libs you use ?