This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Description
I realise Preact 10.x is in alpha but thought I would raise this, hope it helps (I love picostyle thanks for making it).
Here's a simple reproduction: https://codesandbox.io/s/32pwokmxp5
I found that in case of a childless component the children passed to the HOF is {}, but h wants an array. A change of the code in https://github.com/morishitter/picostyle/blob/master/src/index.js#L57 to:
children = children.length ? children : []
solves the issue for me.
I'm not entirely sure if this could be considered a Preact bug, but their VNode implementation is private so maybe we should assume its a needed enhancement to picostyle.
I realise my solution will not necessarily work for the other frameworks. Is it a good time to consider adapters for the diff frameworks?