[Collapse] Rehydration missmatch warnings when using Collapse on v1
See original GitHub issueI’m having a rehydration missmatch warnings when using Collapse on a Next.js app.
Warning: Prop `className` did not match. Server: "rah-static rah-static--height-zero css-vppuuz" Client: "rah-static rah-static--height-zero css-1asjk0u-Collapse"
in div (created by AnimateHeight)
in AnimateHeight (created by Context.Consumer)
in EmotionCssPropInternal (created by Collapse)
in Collapse (at pages/index.jsx:17)
in ColorModeProvider (created by ChakraProvider)
in ThemeProvider (created by ChakraProvider)
in ChakraProvider (at pages/index.jsx:14)
in Home (created by App)
in App
in ErrorBoundary (created by ReactDevOverlay)
in ReactDevOverlay (created by Container)
in Container (created by AppContainer)
in AppContainer
in Root
Link to minimal reproduction https://github.com/santialbo/throwaway-chakra-bug-repro
Steps to Reproduce (repro repo followed this steps)
npx create-next-app
cd my-app
yarn add @chakra-ui/core@1.0.0-rc.0 @chakra-ui/theme@1.0.0-rc.0
yarn dev
with the following on my-app/pages/index.js
import React from "react";
import {
Button,
ChakraProvider,
Collapse,
useDisclosure,
CSSReset,
} from "@chakra-ui/core";
import theme from "@chakra-ui/theme";
const Home = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
return (
<ChakraProvider theme={theme}>
<CSSReset/>
<Button colorScheme="green" onClick={onOpen}>Open</Button>
<Collapse isOpen={isOpen}>
<Button colorScheme="red" onClick={onClose}>Close</Button>
</Collapse>
</ChakraProvider>
);
};
export default Home;
- OS: OSX
- Browser tested on FF and Chrome
- Version 1.0.0-rc.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (10 by maintainers)
Top Results From Across the Web
"type mismatch" in collapse - Statalist
Dear all, I'm getting the error message type mismatch (r109) using the collapse function collapse proc_date, by(id_no) - and I'm not sure ...
Read more >Collapse - Bootstrap
Collapse. Toggle the visibility of content across your project with a few classes and ... You can use a link with the href...
Read more >Interobserver Agreement of Inferior Vena Cava Ultrasound ...
Interobserver Agreement of Inferior Vena Cava Ultrasound Collapse Duration and Correlated Outcomes in Children With Dehydration.
Read more >Collapse in the Endurance Athlete
Athletes who are awake and alert after the collapse are less likely to be ... Treatment of the dehydrated athlete should begin with...
Read more >Collapse search results | Elasticsearch Guide [8.5] | Elastic
Collapsing is applied to the top hits only and does not affect aggregations. Expand collapse resultsedit. It is also possible to expand each...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My pr on emotion got merged, updating to
@emotion/core@10.0.35
should fix this issue. Is this something dependabot does?This doesn’t fix the Image issue, please open a separate issue if you are able to reproduce it.
@with-heart, it’ll be good if another can investigate this to know what the cause of this issue is.