Re:React is a fractal of bad design
by coppertuft on Tuesday March 07, 2023 @09:25PM
(#35064423)
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!
[ Parent
| on HN ]
Re:React is a fractal of bad design
by Rodeoclash on Tuesday March 07, 2023 @09:34PM
(#35064476)
If you use Typescript, take a look at: 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/...
Re:React is a fractal of bad design
by coppertuft on Wednesday March 08, 2023 @02:38PM
(#35073730)
Thank 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!