Comment

Comment by parhamn

I've been wondering recently if there could be a more generic JSX renderer that could be built into browser. <script type="jsx"> type thing.

I think it could work if it decoupled the reactivity layer and exported a "rerender me" hook that libraries like react/preact/vue/solid/etc could use to manage reactivity.

Because let's be real, `<ul render="@items: (name,index)` and `v-for` type things are terrible. JSX got a lot of things right. It's a pretty darn good marriage of HTML and javascript as far as syntax goes. Besides className, key and the curly syntax to drop into javascript, its pretty pure and straight forward.

parent parhamn 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton