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

@mantine/emotion can not work with @mantine/notifications #6176

Closed
1 of 2 tasks
GZTimeWalker opened this issue May 3, 2024 · 2 comments
Closed
1 of 2 tasks

@mantine/emotion can not work with @mantine/notifications #6176

GZTimeWalker opened this issue May 3, 2024 · 2 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@GZTimeWalker
Copy link

GZTimeWalker commented May 3, 2024

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.9.0

What package has an issue?

@mantine/notifications, @mantine/emotion

What framework do you use?

Vite

In which browsers you can reproduce the issue?

All

Describe the bug

@mantine/emotion can not work with @mantine/notifications, I have tried:

  1. This will throw Invalid hook call when use showNotification:

    <MantineProvider
      stylesTransform={emotionTransform}
    >
      <MantineEmotionProvider>
        <Notifications />
        {/*  others... */}
      </MantineEmotionProvider>
    </MantineProvider>
  2. This will throw Emotion cache is not available:

    <MantineProvider
      stylesTransform={emotionTransform}
    >
      <Notifications />
      <MantineEmotionProvider>
         {/*  others... */}
      </MantineEmotionProvider>
    </MantineProvider>
  3. This will also throw Emotion cache is not available:

    <MantineProvider
      stylesTransform={emotionTransform}
    >
      <MantineEmotionProvider>
         {/*  others... */}
      </MantineEmotionProvider>
      <Notifications />
    </MantineProvider>

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

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

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label May 3, 2024
@GZTimeWalker
Copy link
Author

May I wonder when the patch will be released?

@rtivital
Copy link
Member

rtivital commented May 8, 2024

Fixed in 7.9.1

@rtivital rtivital closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants