4 ms·
I used to be a huge Vue proponent for about 3 years and stopped using it at the end of 2018. I moved to Inferno + MobX because the cognitive overhead is practi
by pier25 7y ago
I used to be a huge Vue proponent for about 3 years and stopped using it at the end of 2018.
I moved to Inferno + MobX because the cognitive overhead is practically nil. You can architecture your application and specially your state in any way you wish since your reactive data is made of objects, classes, or whatever you want to use.
MobX also makes your React/Inferno components much more enjoyable. No need to use setState() anymore since your component state is reactive much like Vue or Svelte do.
After using that for a while and coming back to an old Vue/Vuex project I realized how many conventions and ad-hoc abstractions it has which was quite oppressive.
A couple of weeks ago I discovered mobx-jsx[1] which is pretty interesting. It's a very thin rendering library that compiles JSX to imperative DOM instructions and relies on MobX for tracking state changes which makes the virtual dom irrelevant. It adds loops and conditionals which IMO are the biggest annoyances of using JSX. This is probably what I'll be moving on in future projects.
(Actually what converts JSX to DOM instructions is a babel plugin from the same author)
[1] https://github.com/ryansolid/mobx-jsx https://github.com/ryansolid/mobx-jsx