preactjs / preact-custom-element

Wrap your component up as a custom element
MIT License
360 stars 52 forks source link

Feature Request: Use the "render" function of preact/compat #67

Open xandermann opened 2 years ago

xandermann commented 2 years ago

Hi,

I see the library is using the preact render function to render the custom elements.

https://github.com/preactjs/preact-custom-element/blob/5790765ec0227ebb16add2f1469aef648e9f9f9e/src/index.js#L1-L2

But as mentionned in the preact doc here https://preactjs.com/guide/v10/upgrade-guide#render-always-diffs-existing-children , the render function of preact has a different behavior than the React render method.

On my side, I'd like to use the import { render } from "preact/compat"; render function instead of the default one.

Do you think it would be nice if we add a choice about which render function to use ? It would be great !

Thank you ! 😊