#i18n with Next.js 13 and app directory

4 messages · Page 1 of 1 (latest)

austere hazel
#

Hello everyone! I'm currently working on translations and following the steps outlined in this lecture https://dev.to/adrai/i18n-with-nextjs-13-and-app-directory-18dm. However, I encountered an error when attempting to useMutation in my component. The error message states: "Error: No QueryClient set, use QueryClientProvider to set one."

Here's a brief overview of my app's structure:

Thank you in advance for your assistance!

#

my providers file ```export function Providers({ children }: { children: React.ReactNode }) {
const [client] = React.useState(new QueryClient({ defaultOptions: { queries: { staleTime: 5000 } } }))
return (
<QueryClientProvider client={client}>
<CacheProvider>
<ChakraProvider>{children}</ChakraProvider>
</CacheProvider>
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
)
}

vale sparrow
#

there is this official example now: npx create-next-app --example app-dir-i18n-routing i18n-app

austere hazel
#

So what have i to do?