4 ms·
I’ve happily used MobX for years. It comes with its own quirks but almost completely bypassed the awfully awkward state management that is React. Made my life 2
by coppertuft 4y ago
I’ve happily used MobX for years. It comes with its own quirks but almost completely bypassed the awfully awkward state management that is React. Made my life 200% more enjoyable!
- Rodeoclash 4y agoIf you use Typescript, take a look at: https://mobx-keystone.js.org/ https://mobx-keystone.js.org/ It's an additional layer on top of MobX that adds strong typing. I've been using it for an open source video annotation project and it's been amazing for keeping track of local state, cascading calculations of things. Here's my "models" directory for it if you want a taste of how it works: https://github.com/Rodeoclash/vodon-player/blob/main/player/src/services/models/ https://github.com/Rodeoclash/vodon-player/blob/main/player/...
- coppertuft 4y agoThank you! If only I had been a better programmer back then I'd probably have opted for a solution like this. Instead I had worked out through the year and made some highly custom system that resulted in very similar patterns. Too ingrained in my app now to consider new options but might be a good idea to build on top of those next time around!