Preact HTM vs JSX #543
-
Hi all. Would be there any major difference in using HTM with Fresh instead of JSX? Couldn't find any resource that picked up on that. If so, is there any adjustment needed to start using it? Thanks for any hints |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The main difference of JSX vs |
Beta Was this translation helpful? Give feedback.
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.