Skip to content

Instantly share code, notes, and snippets.

@samuelint
Last active February 2, 2024 16:01
Show Gist options
  • Save samuelint/0c03843b5aa047a617eec1ff1ffdb466 to your computer and use it in GitHub Desktop.
Save samuelint/0c03843b5aa047a617eec1ff1ffdb466 to your computer and use it in GitHub Desktop.
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