QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.79k stars 1.3k forks source link

Qwikly convert React projects to Qwik projects #882

Closed omerman closed 2 years ago

omerman commented 2 years ago

Is your feature request related to a problem?

I was thinking, any new framework, especially in JS world, has a ton for it to actually catch up. For qwik to really work, alongside with the smart way it works, it must be adopted as part of many ui libraries.

Take MaterialUI for example, if there was a tool that could generate from existing React + JS code the equivalent Qwik code, Im sure a lot more devs will give Qwik a try, I know I would.

Describe the solution you'd like

If it's possible offcourse, writing a script that will go over JS/TS repos, and generate Qwik syntax version for those.

Describe alternatives you've considered

Writing from scratch popular UI libraries.

Additional context

Please let me know what you think, and if this idea even seems possible.

nnelgxorz commented 2 years ago

Suggested reading: https://dev.to/this-is-learning/the-cost-of-consistency-in-ui-frameworks-4agi

Long story short, this is more difficult than just finding a 1 to 1 transform for syntaxes. Different frameworks produce very different output for equivalent code.

Any attempt to automate a transform from React to Qwik would also need to compensate for differences in runtime to be able to ensure consistent behavior.

Possible, but a pretty steep mountain to climb.

manucorporat commented 2 years ago

At builder we also building Mitosis, a technology to write components and output in any framework, in fact developers are already building UI libraries in Mitosis: https://github.com/CKGrafico/papanasi We will soon have first class support for Qwik.

Also, Qwik can bootstrap React in a partial hydration fashion: https://twitter.com/QwikDev/status/1540667422402920448