devtools: Conflicting @emotion/react

My app uses Mantine component library, which uses Emotion under the hood. But it seems React Hook Form DevTools also uses Emotion, but a different version. When I add DevTools to my app, I now get the following warning on the console:

You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used.

Should I ignore it, or is there a way to make DevTools more “sandboxed”?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Sure, it is as easy as moving the dependency line to peer dependencies. As version restriction, I would use "@emotion/react": ">=11.0.0". I will open a PR.