feat: add define.layout helper (#3198)

This commit is contained in:
Marvin Hagemeister
2025-08-06 15:23:18 +02:00
committed by GitHub
parent f35338b75f
commit 27e407a1e3
2 changed files with 31 additions and 0 deletions
+12
View File
@@ -71,3 +71,15 @@ export default define.page<typeof handler>((props) => {
);
});
```
There is also a `define.layout()` helper for layouts:
```tsx
export default define.layout((props) => {
return (
<div>
<h1>I like {props.state.foo}</h1>
</div>
);
});
```