Closed MahirAlam closed 1 week ago
maybe this template will help you: https://github.com/mantinedev/next-app-template
maybe this template will help you: https://github.com/mantinedev/next-app-template
Thank you for your reply! I have found the problem.
Pease help me update the docs.
<ColorSchemeScript />
Should be used like this or it will give error (at least hydration error)
"use client";
import { ColorSchemeScript, MantineProvider as Provider } from "@mantine/core";
import Head from "next/head";
import { theme } from "@/utils/theme";
const MantineProvider = ({ children }: { children: React.ReactNode }) => {
return (
<>
<Head>
<ColorSchemeScript nonce="8IBTHwOdqNKAWeKl7plt8g==" />
</Head>
<Provider theme={theme}>{children}</Provider>
</>
);
};
export default MantineProvider;
Note: use client is a must
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.12.2
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
Not applicable – issue is not related to the browser
Describe the bug
It seems mantine is trying to render styles tag. I guess something like this
It's giving the following error...
a
Note: you can't run this in codesandbox.io. So please clone the repository and use
npm i --legacy-peer-deps
when installing dependencies.If possible, include a link to a codesandbox with a minimal reproduction
https://github.com/MahirAlam/tera-tok
Possible fix
I guess adding precedence="default" will solve the issue?
Self-service