Skip to content

TypeError: Cannot read properties of null (reading '__H') after Preact update #3393

@maltium

Description

@maltium

We have a project that uses Preact that was mostly written when 10.0.0 was released. After updating to the latest Preact version, I'm getting a runtime error when mounting certain components.

image

After some digging I realized that this is happening upon mounting components that use hooks. Moreover, I performed a bisect on Preact version dependencies and found out that it starts to break from Preact 10.5.6 upwards (all other previous versions are fine).

To Reproduce

Unfortunately it's hard to isolate into a smaller project since the Preact part is only a small part of the whole project.

For now I've converted the affected components into class components and got things working again on the latest Preact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions