4 ms·
Is it possible to use Solid with just plain JavaScript/TypeScript (like using createElement with React)? I generally find those far more readable than JSX (and
by torb-xyz 6y ago
Is it possible to use Solid with just plain JavaScript/TypeScript (like using createElement with React)?
I generally find those far more readable than JSX (and is one of the reasons I think SwiftUI and Flutter code looks nicer than React).
- ryansolid 6y agoYou can use HyperScript(createElement) version. You just forgo the advantages of compilation - better dx(less need for explicit wrapping), better performance(optimized code path), and smaller bundle size (more directed code). Solid's JSX does not compile to HyperScript like React. HyperScript is a different slightly de-optimized experience.
- mudge 6y agoIt sounds to me that you are looking for Webscript: https://mudgen.github.io/webscript/docs/ https://mudgen.github.io/webscript/docs/ Webscript does work with SolidJS nicely.
- torb-xyz 6y agoProbably should have specified, but a big ting I'm looking for is sull TypeScript support in this regard. Webscript looks really cool, but it doesn't look very TypeScript-friendly.