feat: add define.layout helper (#3198)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user