Public
Like
docs
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v504View latest version
| title: | HTML & JSX |
|---|---|
| description: | You can use JSX syntax in Val Town to render HTML using React, Preact, Vue, Solid, etc. |
To use JSX, you'll need to insert what TypeScript calls a
"per-file pragma" - a
comment that uses @jsxImportSource to specify where the JSX methods are going
to come from. For example, if you're implementing JSX with Preact, the pragma
will look like this at the top of your file:
/** @jsxImportSource https://esm.sh/react */
We recommend using React:
Preact is a great alternative to React: