diff --git a/README.md b/README.md index 2f6bdc9..07c5e95 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,58 @@ export default function App({ Component, pageProps }: AppProps) { } ``` +If you are using `Next.js` version `13` with `app` directory, updated `layout.jsx` will look like this: + +``` +import { + getDefaultWallets, + RainbowKitProvider, +} from '@rainbow-me/rainbowkit'; +import { configureChains, createClient, WagmiConfig } from 'wagmi'; +import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains'; +import { publicProvider } from 'wagmi/providers/public'; +import './globals.css' + +const { chains, provider } = configureChains( + [mainnet, polygon, optimism, arbitrum], + [publicProvider()] +); + +const { connectors } = getDefaultWallets({ + appName: 'My RainbowKit App', + chains +}); + +const wagmiClient = createClient({ + autoConnect: true, + connectors, + provider +}) + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {/* +
+will contain the components returned by the nearest parent + head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head + */} +
+