Earlier quoted context omitted.
The idea is very much like knockout and meteor, but the reactivity implementation is completely different. First all it is generic and not designed for just the UI. MobX is completely glitch free and synchronous and has explicit distinction between computed values and reactions (side effects like updating the DOM). More important, MobX determines the right execution other of derivations on the fly, preventing issues…
> MobX is completely glitch free MobX looks interesting but I am a little concerned that you are claiming it is bug-free.
MobX – Simple, scalable state management for React
11–20 of 27 posts
Re: MobX – Simple, scalable state management for React
#12Mobx is a blessing ! I work on React only since a few months, I have a ton of subjects to learn, a ton of libraries to learn to how to use them. I really don't have time to learn a complex library like Redux. I tried, and learned its principles, but I soon saw that it would totally transform my existent codebase into a large cream cake with some boilerplate code everywhere. I come from Java world, which is often mock…
I haven't used Moxb but I've used Redux a lot the last 6 months, building mobile apps and also a rewrite of our frontend at Typeform. I'm not sure how Redux could be considered complex, the API is very small and the ideas are small as well. There is really not much to learn with Redux. Redux is like literally 100 lines of code if you remove comments and simple sanity checks. Also, not sure what you mean with boilerpl…
All that adds up and is a lot of work for a simple component.
We ended up going with a hybrid setup. Our components are all dumb, and our "pages" are the only connected components. We also started using ducks[1] instead of spreading the reducer/actions everywhere whenever it makes sense.
Re: MobX – Simple, scalable state management for React
#13Mobx is a blessing ! I work on React only since a few months, I have a ton of subjects to learn, a ton of libraries to learn to how to use them. I really don't have time to learn a complex library like Redux. I tried, and learned its principles, but I soon saw that it would totally transform my existent codebase into a large cream cake with some boilerplate code everywhere. I come from Java world, which is often mock…
I haven't used Moxb but I've used Redux a lot the last 6 months, building mobile apps and also a rewrite of our frontend at Typeform. I'm not sure how Redux could be considered complex, the API is very small and the ideas are small as well. There is really not much to learn with Redux. Redux is like literally 100 lines of code if you remove comments and simple sanity checks. Also, not sure what you mean with boilerpl…
I found myself straining a little to memorize code snippets to get things started.
Once up and running, it's a breeze, though of course I agree with the common sentiment that it's too easy to overuse, and native React state too easy to underuse.
Re: MobX – Simple, scalable state management for React
#14I wrote a very large app in Knockout back in the day, and ran into significant problems with Knockout's computeds and the two way data binding. It was great to start with, but as the app got larger and more involved, performance started to suffer (from all the different observables and computed triggering and retrigger on a change), memory leaks started to creep in, and eventually I started noticing weird glitches wh…
Re: MobX – Simple, scalable state management for React
#15I wrote a very large app in Knockout back in the day, and ran into significant problems with Knockout's computeds and the two way data binding. It was great to start with, but as the app got larger and more involved, performance started to suffer (from all the different observables and computed triggering and retrigger on a change), memory leaks started to creep in, and eventually I started noticing weird glitches wh…
Re: MobX – Simple, scalable state management for React
#16Earlier quoted context omitted.
I haven't used Moxb but I've used Redux a lot the last 6 months, building mobile apps and also a rewrite of our frontend at Typeform. I'm not sure how Redux could be considered complex, the API is very small and the ideas are small as well. There is really not much to learn with Redux. Redux is like literally 100 lines of code if you remove comments and simple sanity checks. Also, not sure what you mean with boilerpl…
Redux isn't conceptually complex, but I found it hard to get started with. The trouble I had wasn't the ideas, which are very clear, but in trying to predict which parts (composing reducers, passing state to components) would be animated by Javascript magic, and which were plain-ol-Javascript. I found myself straining a little to memorize code snippets to get things started. Once up and running, it's a breeze, though…
For my next Resct project I intend to go as far as I can with simple container components before I start pulling in the whole Redux toolkit.
Re: MobX – Simple, scalable state management for React
#17Earlier quoted context omitted.
Redux isn't conceptually complex, but I found it hard to get started with. The trouble I had wasn't the ideas, which are very clear, but in trying to predict which parts (composing reducers, passing state to components) would be animated by Javascript magic, and which were plain-ol-Javascript. I found myself straining a little to memorize code snippets to get things started. Once up and running, it's a breeze, though…
It gets really hairy when you have to weave in asynchronous actions and things like react-thunk or react-saga. By the time you've wrapped your head around those concepts as well the whole React stack doesn't feel quite as much like the breath of fresh air it does when you first start using it. For my next Resct project I intend to go as far as I can with simple container components before I start pulling in the whole…
In his trainings he constantly sees people trying to rush React and asking him about Redux (which he doesn't cover).
Re: MobX – Simple, scalable state management for React
#18Earlier quoted context omitted.
It gets really hairy when you have to weave in asynchronous actions and things like react-thunk or react-saga. By the time you've wrapped your head around those concepts as well the whole React stack doesn't feel quite as much like the breath of fresh air it does when you first start using it. For my next Resct project I intend to go as far as I can with simple container components before I start pulling in the whole…
This is why Ryan Florence (react-router, React Training) just made his keynote speech at the React Rally conference about people overusing Redux and not learning or wanting to use plain old React. In his trainings he constantly sees people trying to rush React and asking him about Redux (which he doesn't cover).
Re: MobX – Simple, scalable state management for React
#19Earlier quoted context omitted.
Redux isn't conceptually complex, but I found it hard to get started with. The trouble I had wasn't the ideas, which are very clear, but in trying to predict which parts (composing reducers, passing state to components) would be animated by Javascript magic, and which were plain-ol-Javascript. I found myself straining a little to memorize code snippets to get things started. Once up and running, it's a breeze, though…
It gets really hairy when you have to weave in asynchronous actions and things like react-thunk or react-saga. By the time you've wrapped your head around those concepts as well the whole React stack doesn't feel quite as much like the breath of fresh air it does when you first start using it. For my next Resct project I intend to go as far as I can with simple container components before I start pulling in the whole…
Re: MobX – Simple, scalable state management for React
#20I wrote a very large app in Knockout back in the day, and ran into significant problems with Knockout's computeds and the two way data binding. It was great to start with, but as the app got larger and more involved, performance started to suffer (from all the different observables and computed triggering and retrigger on a change), memory leaks started to creep in, and eventually I started noticing weird glitches wh…
The motivation was to reduce boilerplate and improve the readability of redux state transformations. I've found that the number of files I need to touch to create an action drastically decreases.
At this point most of my development time is spent either in the module, the handler, or the saga.