Skip to content

Preact HTM vs JSX #543

Closed Answered by marvinhagemeister
ThePeach asked this question in Q&A
Jul 25, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The main difference of JSX vs htm is that JSX is type safe, but needs some form of transpilation to turn it into valid JavaScript. htm on the other hand already is valid JavaScript and can be used as is in the browser. It's meant as an alternative to JSX. The downside is that it cannot be made type safe as extending TypeScript is very tricking and they don't have a proper plugin API for enhancing type checking so far.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ThePeach
Comment options

Answer selected by marvinhagemeister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants