Last active
February 2, 2024 16:01
-
-
Save samuelint/0c03843b5aa047a617eec1ff1ffdb466 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { ReactNode, use } from 'react'; | |
interface Props { | |
params: { | |
id: string; | |
}, | |
children: ReactNode; | |
} | |
export default async function MyServerSideComponent({ | |
params, | |
children, | |
}: Props) { | |
const data = use(listMyData({ id: params.id })) | |
return ( | |
<div> | |
<MyClientSideComponent existing={data} /> | |
{ children } | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment