Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created April 22, 2024 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulieScanlon/960f5a69cce17b6a99e2c7e92eeea3d7 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/960f5a69cce17b6a99e2c7e92eeea3d7 to your computer and use it in GitHub Desktop.
Example layout component
// src/layouts/_layout.tsx
import { Provider } from 'jotai';
type Props = {
children: React.ReactNode;
};
const RootLayout: React.FunctionComponent<Props> = async ({ children }) => {
return (
<main>
<Provider>{children}</Provider>
</main>
);
};
export default RootLayout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment