Skip to content

10.0.0-alpha.0 - Returning undefined redraws the component tree #1343

@jpodwys

Description

@jpodwys

Thank you for the exciting major release! I've noticed a behavior difference between Preact 8 and X.

In Preact 8, returning nothing (undefined) from a render method bails with no noticeable negatives.
https://codesandbox.io/s/z3155xpy1m

In Preact X, doing the same thing redraws the component tree (made visible with a CSS animation).
https://codesandbox.io/s/llkv0l9qx7

Strangely, moving the component that returns undefined to the bottom of the markup in Preact X hides the issue.
https://codesandbox.io/s/j3x8pk299w

Metadata

Metadata

Assignees

No one assigned

    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