docs: update more pages for Fresh 2 (#3141)

This commit is contained in:
Marvin Hagemeister
2025-07-25 19:04:08 +02:00
committed by GitHub
parent ff34ec8342
commit b4e4a0c0f0
8 changed files with 130 additions and 8 deletions
+6
View File
@@ -79,6 +79,12 @@ Pass data to the next middlewares with state. Every request has its own state
object.
```ts
interface State {
text?: string;
}
const app = new App<State>();
app.use((ctx) => {
ctx.state.text = "foo";
return ctx.next();