3 ms·
TypeScript works very well with React, less so with Redux/ImmutableJS. We just moved our app from Redux and ImmutableJS to mobx and it's been a treat: we now g
by Keats 10y ago
TypeScript works very well with React, less so with Redux/ImmutableJS.
We just moved our app from Redux and ImmutableJS to mobx and it's been a treat: we now get full typing and it's much less verbose. We don't need to repeat the payload definition at every point, we have a store where we call a method and that's it. Highly recommend checking out mobx if you use TS.
- gbog 10y agomobx seem to be one year old, that not enough.
- mst 10y agoI'm not sure what you mean, given the mobx project has existed as mobservable for quite some time.
- saosebastiao 10y agoI too have switched to only using Mobx and have come to the same conclusion.
- cloverich 10y agoI've been using Typescript, React, and mobx and absolutely in love with how they all work together. For me the high-level summary is that the vast majority of my logic is moved out of React views and into stores / controllers / whatever, with almost no boilerplate to make them play nicely together. The way its coming along reminds me of Ember quite a bit, but I get to use React and POJO's.
- iamcasen 10y agoI definitely want to look into mobx now. Just thought I would throw out there that I've been using Nuclear-js/Immutable.js and it has a lot of the benefits you mentioned. All the data manipulation logic is encapsulated nicely, and merely appears as state to your components. You can observe memoized transforms in your components so that they only need to listen for the data they need, rather than a single change event on an entire store.
- cloverich 10y agoI've been using Typescript, React, and mobx and absolutely in love with how they all work together. For me the high-level summary is that the vast majority of my logic is moved out of React views and into stores / controllers / whatever, with almost no boilerplate to make them play nicely together. The way its coming along reminds me of Ember quite a bit, but I get to use React and POJO's.