S
SolidJS15mo ago
iNdra

What are these solid-js/html, solid-js/h and solid-js/universal?

I found these solid-js/html, solid-js/h and solid-js/universal in SolidJS package. I would like to know what are these, and can I use these for production? Are there have any documentation to learn these?
6 Replies
lxsmnsyc
lxsmnsyc15mo ago
solid-js/html and solid-js/h are Solid's solution to the buildless question. Solid kinda relies on the compiler to build UIs, but it's not like everyone uses a bundler/compiler. solid-js/html provides an html tagged template, solid-js/h provides a Hyperscript constructor. solid-js/universal on the other hand, allows SolidJS to render non-DOM elements. Applications include canvas, 3D rendering, CLIs, mobile/native UIs, etc.
iNdra
iNdraOP15mo ago
Thank you for your information. So no point to use solid-js/html and solid-js/h when use bundler. I see solid-js/html and solid-js/h use in JSX file. So how to use JSX without using bundler? I thought Hyperscript use for speed up, code cleaning and tree shaking. How to use solid-js/universal for mobile/native UIs? Is it possible to use mobile App create like react native?
lxsmnsyc
lxsmnsyc15mo ago
I see solid-js/html and solid-js/h use in JSX file. So how to use JSX without using bundler? I thought Hyperscript use for speed up, code cleaning and tree shaking.
you don't. hence why these are the alternatives.
How to use solid-js/universal for mobile/native UIs? Is it possible to use mobile App create like react native?
Yes, but this is highly advanced. There are existing projects utilizing the universal. This is an example: https://github.com/solidjs-community/solid-three
GitHub
GitHub - solidjs-community/solid-three: port of @react-three/fiber ...
port of @react-three/fiber for solid. Contribute to solidjs-community/solid-three development by creating an account on GitHub.
iNdra
iNdraOP15mo ago
Thank you for your information. I got this from Github,
Using html is slightly less efficient than JSX(but more than HyperScript), requires a larger runtime that isn't treeshakeable, and cannot leverage expression analysis, so it requires manual wrapping of expressions and has a few other caveats.
So considering efficiency JSX > solid-js/html > HyperScript. Is there have any package support with solid-js/universal like react native for mobile app development? solid-three use for 3D Canva.
lxsmnsyc
lxsmnsyc15mo ago
I can't answer for react native-like renderer
iNdra
iNdraOP15mo ago
thank you for information. I found this - https://github.com/tjjfvi/solid-native
GitHub
GitHub - tjjfvi/solid-native: Solid Native expands the Solid ecosys...
Solid Native expands the Solid ecosystem to include development of native mobile applications. - GitHub - tjjfvi/solid-native: Solid Native expands the Solid ecosystem to include development of nat...
Want results from more Discord servers?
Add your server