docs: update for vite (#3308)

Update docs for vite
This commit is contained in:
Marvin Hagemeister
2025-09-02 10:45:27 +02:00
committed by GitHub
parent 6ddc0fbbcb
commit 9e58af7a5c
18 changed files with 372 additions and 318 deletions
+4
View File
@@ -29,9 +29,11 @@ An island can be used anywhere like a regular Preact component. Fresh will take
care of making it interactive on the client.
```tsx main.tsx
import { App, staticFiles } from "fresh";
import MyIsland from "./islands/my-island.tsx";
const app = new App()
.use(staticFiles())
.get("/", (ctx) => ctx.render(<MyIsland />));
```
@@ -72,9 +74,11 @@ A powerful feature of Fresh is that you can pass server-rendered JSX to an
island via props.
```tsx routes/index.tsx
import { staticFiles } from "fresh";
import MyIsland from "../islands/my-island.tsx";
const app = new App()
.use(staticFiles())
.get("/", (ctx) => {
return ctx.render(
<MyIsland jsx={<h1>hello</h1>}>