3 ms·
Preact requires a build step otherwise you don't get JSX and you have to build applications a la mithril.js mode: > const app = h('h1', null, 'Hello World!');
by hu3 3y ago
Preact requires a build step otherwise you don't get JSX and you have to build applications a la mithril.js mode:
> const app = h('h1', null, 'Hello World!');
With Web Components no build step is required and you're still able to intermix HTML with JS just like JSX. See the code below this section: https://github.com/kennyfrc/cami.js#key-concepts--api https://github.com/kennyfrc/cami.js#key-concepts--api
- Joeri 3y agoYou can use the htm library as a pure client-side jsx: https://github.com/developit/htm https://github.com/developit/htm It is not completely the same, but far better than that h function madness.
- deleted 3y ago[deleted]