Skip to content

[React 18] Selective Hydration fails hydration when using context api #22692

@maraisr

Description

@maraisr

Based on the selective hydration example provided by @gaearon ??

https://codesandbox.io/s/mystifying-haibt-39oed

Look out for 👉
image

One can see that hydrating html does in fact fail when using Context API — or perhaps that's a red herring? The trees do in fact line up during render, and hydration, there's just an effect that sets state — but that is post hydration??

Could be them related; in anycase — strictly speaking to that code sandbox, what am i doing wrongly?


Initially caught when ImportedComponent fails see https://github.com/theKashey/react-imported-component/blob/c290d76623693389a11cc514c92f47efadac47ba/src/ui/ImportedController.tsx#L29

Metadata

Metadata

Assignees

No one assigned

    Labels

    React 18Bug reports, questions, and general feedback about React 18Type: Discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions