Emotion + @builder.io/react don't work together - "sheet.hydrate is not a function"
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 1.2k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 17
Description
**Describe the bug**
I have a Next.js 12 project that uses MUI, which uses Emotion, and I want to integrate it with Builder.io. When I try to use the `CacheProvider` component, I get a `sheet.hydrate is not a function` error.
**To Reproduce**
Steps to reproduce the behavior:
1. I set up a Next.js 12 project.
2. I installed my dependencies, mainly `@mui/material`, `@emotion/react`, and `@emotion/styled`.
3. Install the `@builder.io/react` library.
4. Set up `_app.js` to utilize the `CacheProvider` with a key.
5. Set up `index.js` to initialize the `ThemeProvider`, added the `CssBaseline` component, and added a singular element that should be styled by the theme.
[Here's the CodeSandbox](https://codesandbox.io/p/sandbox/blazing-rain-fz90mw?file=%2Fpackage.json&selection=%5B%7B%22endColumn%22%3A36%2C%22endLineNumber%22%3A12%2C%22startColumn%22%3A36%2C%22startLineNumber%22%3A12%7D%5D&workspace=%257B%2522activeFileId%2522%253A%2522cl8skx9az000nlpgeaw1kc72o%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%252C%2522%252Fpackage.json%2522%252C%2522%252Fpages%252F_app.jsx%2522%252C%2522%252Fnext.config.js%2522%252C%2522%252Fpages%252Findex.jsx%2522%252C%2522%252Flib%252Fconfiguration%252Ftkxel-vrio-theme.json%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A3001%252C%2522url%2522%253A%2522fz90mw-3001.preview.csb.app%2522%252C%2522key%2522%253A%2522clattbfbi02zz206eglhnb8kp%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clatsse7o00167nge590xhhv6%2522%252C%2522key%2522%253A%2522clatsse5g00f5206esm8kf3eq%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D).
**Expected behavior**
This shouldn't cause a bug, I should be able to use these dependencies together.
**Screenshots**

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.