Preact: 10.0.0-alpha.0 - Returning undefined redraws the component tree

Created on 6 Mar 2019  路  2Comments  路  Source: preactjs/preact

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

bug

Most helpful comment

Thanks a bunch for your work on this @marvinhagemeister and @Almo7aya!

All 2 comments

Related #1327

Thanks a bunch for your work on this @marvinhagemeister and @Almo7aya!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skaraman picture skaraman  路  3Comments

jasongerbes picture jasongerbes  路  3Comments

k15a picture k15a  路  3Comments

kossnocorp picture kossnocorp  路  3Comments

mizchi picture mizchi  路  3Comments