Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AreaChart cannot find MantineProvider and does not render under React 19 #7370

Closed
1 of 2 tasks
mfulton26 opened this issue Jan 15, 2025 · 1 comment
Closed
1 of 2 tasks
Labels
Duplicate A duplicate of other issue

Comments

@mfulton26
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.16.0

What package has an issue?

@mantine/charts

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

I have inspected the component tree. All other mantine components render fine and there is a MantineProvider at the root of the app. This broke when upgrading React from 18.3.1 to 19.0.0

Something went wrong
@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app

Error: @mantine/core: MantineProvider was not found in component tree, make sure you have it in your app
    at useMantineTheme (http://localhost:3000/node_modules/.vite/deps/chunk-5ZRGPGLE.js?v=a9337246:929:11)
    at useProps (http://localhost:3000/node_modules/.vite/deps/chunk-5ZRGPGLE.js?v=a9337246:2223:17)
    at @mantine/charts/AreaChart (http://localhost:3000/node_modules/.vite/deps/@mantine_charts.js?v=a9337246:29979:17)
    at react-stack-bottom-frame (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:16192:20)
    at renderWithHooks (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:4306:24)
    at updateForwardRef (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:5813:21)
    at beginWork (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:7244:20)
    at runWithFiberInDEV (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:726:18)
    at performUnitOfWork (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:10831:98)
    at workLoopSync (http://localhost:3000/node_modules/.vite/deps/react-dom_client.js?v=a9337246:10692:43)

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-react-template-forked-gmm7p2

Possible fix

I've tried reproducing this in CodeSandbox but there it just renders no area chart at all with React 19 but if I downgrade React to 18.3.1 it renders.

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the Duplicate A duplicate of other issue label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate A duplicate of other issue
Projects
None yet
Development

No branches or pull requests

2 participants