Giter Club home page Giter Club logo

Comments (1)

brophdawg11 avatar brophdawg11 commented on May 28, 2024

This is not a Remix issue but an invalid DOM modification when using React SSR + Hydration: https://react.dev/reference/react-dom/client/hydrateRoot#caveats

hydrateRoot() expects the rendered content to be identical with the server-rendered content. You should treat mismatches as bugs and fix them

Hydration expects the initial client side render to match the server side render exactly - and mutating the DOM like this during page load will always cause issues. Sometimes this is unavoidable due to browser extensions and other scenarios and React is working on fixing those scenarios. But your best bet is to avoid manually mutating the DOM outside of React - and especially before hydration.

Here's a few related issues/discussions in the Remix repo which may have some useful information for handling these scenarios: #5244, #4902

And a blog post from one of our community members: https://www.jacobparis.com/content/remix-hydration-errors

from remix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.