Preact: 10.0.0-alpha.0 - compat cloneElement ignoring props and children

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

Most helpful comment

@marvinhagemeister Here is a snippet showing a difference between using cloneElement from preact vs from preact/compat https://codesandbox.io/s/34z0lkm6pm

All 3 comments

Can you share some code where the issue can be reproduced? Something like a simple snippet in CodeSandbox helps tremendously in fixing issues.

EDIT: Can confirm this via this test case: https://codesandbox.io/s/y32qooolx9

@marvinhagemeister Here is a snippet showing a difference between using cloneElement from preact vs from preact/compat https://codesandbox.io/s/34z0lkm6pm

Ok, I was able to narrow down the issue to using compat together with createElement from core. Because we're only checking for $$typeof to mark a vnode as valid it seems like we need to allow standard preact vnodes, too. Will investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kossnocorp picture kossnocorp  路  3Comments

KnisterPeter picture KnisterPeter  路  3Comments

jescalan picture jescalan  路  3Comments

simonjoom picture simonjoom  路  3Comments

kay-is picture kay-is  路  3Comments