better error handling and full jsx support
This commit is contained in:
parent
11be5e979c
commit
5197e3316d
7 changed files with 258 additions and 85 deletions
13
src/app.tsx
13
src/app.tsx
|
|
@ -3,11 +3,24 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { close, open } from "interest/jsx-runtime";
|
||||
|
||||
async function* Fruits() {
|
||||
const fruits = ["TSX", "Apple", "Banana", "Cherry"];
|
||||
yield open("ol");
|
||||
for (const fruit of fruits) {
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
yield <li>{fruit}</li>;
|
||||
}
|
||||
yield close("ol");
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<>
|
||||
<h1>JSX Page</h1>
|
||||
<p class="oh hey">meowing chunk by chunk</p>
|
||||
<Fruits />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue