-
-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
export default defineRouter(
async id => {
switch (id) {
case 'index': {
const { default: AppCreator } = await import('./src/app.js');
return AppCreator({
name: 'this is index'
});
}
case 'about': {
const { default: AppCreator } = await import('./src/app.js');
return AppCreator({
name: 'this is about'
});
}
default:
return null;
}
},
async () => {
return ['index', 'about'];
}
);
const App = ({ name = "Anonymous" }) => () => {
return (
<div style={{ border: "3px red dashed", margin: "1em", padding: "1em" }}>
<h1>Hello {name}!!</h1>
<h3>This is a server component.</h3>
</div>
);
};
export default App;
Metadata
Metadata
Assignees
Labels
No labels