Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** @jsxImportSource https://esm.sh/solid-jsx */
import { renderToString } from "npm:solid-js/web";
function calc() {
return 4 + 5;
}
function getMarkup() {
return <div>Test {calc()}</div>;
}
export const solidExample = async () =>
new Response(await renderToString(() => getMarkup()), {
headers: {
"Content-Type": "text/html",
},
});
mhalle-solidexample.web.val.run
August 31, 2024