fix: create a component tree that matches between client and server to avoid useId output mismatch (#371)

Co-authored-by: Marco Pasqualetti <marco.pasqualetti@live.com>
This commit is contained in:
Valerio Ageno
2025-01-19 16:23:30 +01:00
committed by GitHub
parent 43910fd75d
commit 33aa37ed7d
20 changed files with 242 additions and 99 deletions
@@ -1,5 +1,6 @@
import type { ReactNode, JSX } from 'react'
import { MDXProvider } from '@mdx-js/react'
import { TuonoScripts } from 'tuono'
interface RootLayoutProps {
children: ReactNode
@@ -12,6 +13,7 @@ export default function RootLayout({ children }: RootLayoutProps): JSX.Element {
<main>
<MDXProvider components={{}}>{children}</MDXProvider>
</main>
<TuonoScripts />
</body>
</html>
)