question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Collapse] Rehydration missmatch warnings when using Collapse on v1

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
santialbocommented, Aug 18, 2020

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.

2reactions
segunadebayocommented, Aug 6, 2020

@with-heart, it’ll be good if another can investigate this to know what the cause of this issue is.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found