Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration errors with export Layout in root #8862

Closed
THOUSAND-SKY opened this issue Feb 22, 2024 · 3 comments
Closed

Hydration errors with export Layout in root #8862

THOUSAND-SKY opened this issue Feb 22, 2024 · 3 comments
Labels
bug Something isn't working package:dev

Comments

@THOUSAND-SKY
Copy link

Reproduction

https://stackblitz.com/edit/remix-run-remix-zvdek1?file=app%2Froot.tsx

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (2) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  npmPackages:
    @remix-run/css-bundle: * => 2.7.2 
    @remix-run/dev: * => 2.7.2 
    @remix-run/node: * => 2.7.2 
    @remix-run/react: * => 2.7.2 
    @remix-run/serve: * => 2.7.2

Used Package Manager

npm

Expected Behavior

I would expect no hydration errors, same as without the Layout export.

Actual Behavior

There's a bunch of hydration errors. Am I using it wrong?

Warning: Expected server HTML to contain a matching <div> in <#document>.
@aaronadamsCA
Copy link
Contributor

I noticed the same problem—it seems to me Layout only works with the Vite dev server.

@kiliman
Copy link
Collaborator

kiliman commented Feb 23, 2024

I think a lot of the new features will only be available with Vite. For example the new server folders. Now that Vite is stable I would recommend migrating to Vite.

@brophdawg11
Copy link
Contributor

This is fixed by #8842 and will be available in the next release

@brophdawg11 brophdawg11 added bug Something isn't working package:dev awaiting release This issue has been fixed and will be released soon and removed bug:unverified labels Feb 27, 2024
@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:dev
Projects
None yet
Development

No branches or pull requests

4 participants