Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solid and mobx-jsx comparison #17

Open
joskoanicic opened this issue May 14, 2020 · 2 comments
Open

Solid and mobx-jsx comparison #17

joskoanicic opened this issue May 14, 2020 · 2 comments
Labels
question Further information is requested

Comments

@joskoanicic
Copy link

Hi @ryansolid , I have started to look into Solid and mobx-jsx and wanted to ask what is the difference between solid and mobx-jsx feature-wise.

I know that they both use the same "render engine" but is anything else missing from mobx-jsx that is available in solid (eg. currently ongoing ssr implementation on solid, or dev tools).

I would like to introduce this library into our workflow for certain components that are slow to render and because we already use mobx with react it seems to me that it would be easy to onboard the other team members (we love mobx for state management). But I would consider Solid if mobx-jsx is more complex than "autorun around the render method" and will not get updates like solid.

My apologies if this may be a stupid question, didn't have time to look more under the hood of each of the libraries to look for all the answers myself.
Btw, great work.

@ryansolid
Copy link
Owner

Oh not stupid question at all. You are correct to assume Solid is further along feature-wise. MobX JSX and KO JSX were actually developed after although I put them out there first more as Proof of Concept. I wanted to show through comparison how much more performant this approach was than using say React + MobX. So I focused on Solid tuning the reactive library etc so that it was best in breed both on rendering approach and reactive performance.

In terms of features MobX JSX gets the features that I back port back into the underlying renderer but depending on the timing it gets them a bit later. For instance I haven't moved to the latest version yet. It has lazy components, SSR and Hydration capability. But it doesn't have more experimental or complicated constructs like Suspense, or Portals, or most of the control flows. I offer a simple map function for lists, and ternaries for conditionals (which are optimized by the compiler). I'm not actively trying to add features here. Just keep it in line with the latest additions to the renderer. Technically these other features could be added even by the community, I just haven't had a reason to prioritize here.

MobX-JSX is most definitely more complicated than just wrapping with an autorun. That would get you maybe Svelte level performance. This library brings that reactive granularity down to the template level. That's all in the underlying JSX compiler but it is definitely nuanced and I would be conscious of that since my priorities are definitely elsewhere. As while this is novel it is also not as popular and doesn't represent the best this technology approach can deliver.

I think that probably reflects what you suspected. I hate pushing people away from one of my libraries but that is the truth. Personally I don't have the incentive to move this much beyond the Proof of Concept. But I think it is a very cool concept.

@joskoanicic
Copy link
Author

Thank you on the thorough response.
I will definitely look into both libraries, as you said the community could pick certain features and therefore push this library forward. Maybe someone from the mobx community finds this approach interesting in the long-run (@FredyC , @mweststrate).

I am currently swamped with work but when I get the time I will try to look more at the implementation details too see if I can contribute somehow. I will be sure to contact you if any questions arise.

@ryansolid ryansolid added the question Further information is requested label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants