Skip to content

Hydration bug with children and spread props after updating to v1.5 #1188

Closed

Description

@kevintakeda

Describe the bug

It seems hydration is broken using this pattern:

const [l, p] = splitProps(props, ["children"]);
<div {...p}>
  {l.children}
  <div></div>
</div>

Error:
TypeError: Cannot read properties of null (reading 'nextSibling')

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-heeavs?file=src/App.tsx

Steps to Reproduce the Bug or Issue

  1. Run npm run dev
  2. See console error
  3. Notice that component is throwing an error that is being handled by ErrorBoundary

Expected behavior

Component not throwing an error after hydration.
It should render the same way it came from the server.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Chrome
  • Version: 104.0

Additional context

No response

Activity

  1. kevintakeda commented on Aug 28, 2022

    @kevintakeda
    Author
  2. ryansolid commented on Aug 28, 2022

    @ryansolid
    Member

    Thanks. I will investigate. The cool thing in 1.5 is that the split props stuff shouldn't be necessary anymore.. You should be able to just spread now.

    Edit: Seems broken too. Ok let me see what's going on.

  3. ryansolid commented on Aug 29, 2022

    @ryansolid
    Member

    Yeah these seem to all be the same issue. Try 1.5.2 which should have the fix.

  4. added a commit that references this issue on Nov 12, 2025
    5a0ed03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions