Coder Social home page Coder Social logo

Hydration Mismatch error about solid HOT 6 OPEN

PeterDraex avatar PeterDraex commented on June 12, 2024
Hydration Mismatch error

from solid.

Comments (6)

ryansolid avatar ryansolid commented on June 12, 2024 1

It's pretty hard for me to debug Solid Query stuff. Like I need to put time aside to get into the code base. It might be easiest to report bugs against them and then they make reproductions with pure createResource so I can better see what is going on without tracing through that code.

from solid.

ardeora avatar ardeora commented on June 12, 2024 1

It's pretty hard for me to debug Solid Query stuff. Like I need to put time aside to get into the code base. It might be easiest to report bugs against them and then they make reproductions with pure createResource so I can better see what is going on without tracing through that code.

Apologies @ryansolid Here is an example with just using createResource.
https://stackblitz.com/edit/github-pqy8j7-n87wnf?file=src%2Fcomponents%2FPage.tsx

I think the Switch component (during SSR) eagerly evaluates and flushes the data when any case matches? In this case you would always see the pending string in the HTML after hydration

from solid.

elite174 avatar elite174 commented on June 12, 2024

This was solved here: https://discord.com/channels/722131463138705510/1229910798135066716/1230151418569298052

from solid.

PeterDraex avatar PeterDraex commented on June 12, 2024

This was solved here: https://discord.com/channels/722131463138705510/1229910798135066716/1230151418569298052

Yeah, a workaround of deferStream: true was suggested on Discord (thank you). Another available workaround is using <Show> instead of <Switch>.

The issue seems to be that as soon as Switch matches a case it renders and flushes the data. So in this case when pending case is matched it renders that and then yields.

from solid.

indeyets avatar indeyets commented on June 12, 2024

it works a bit different with solid-query 5.29:

  1. seems to reach success-state
  2. but still shows Hydration Mismatch in console

from solid.

indeyets avatar indeyets commented on June 12, 2024

attn @ardeora

from solid.

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.