Skip to content

componentDidMount() hooks of child are called after componentDidUpdate() hook of the parent #1223

@xwchris

Description

@xwchris

version: preact@8.3.1

I found the child's componentDidMount hook is called after parent's componentDidUpdate hook.

this is the demo: https://codepen.io/xwchris/pen/vVYVWx

  1. click the toggle show button
  2. see the console log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions