preact-custom-element
preact-custom-element copied to clipboard
Wrap your component up as a custom element
Relates to https://github.com/preactjs/preact/issues/3485
This is documented here in this comment from another PR: https://github.com/preactjs/preact-custom-element/pull/64#discussion_r770010488. `document.createElement` should run the component's constructor method. ```js class CounterPreact extends Component { constructor() { super() console.log('here') } }...
When shadowDOM is not attached and developer wants to render children inside react component it will lead to duplicating of children. 1) Children will be placed at slot as intended...
Hi, great library. I have a question on how to expose properties of a component to the DOM. It looks like you are iterating through the attributes to expose as...
This PR fixes the issue, when complex prop is lost on repeated connectedCallback call. It fixes it by saving all props into this._props. The issue was that when complex prop...
Hi. Firstly, thank you all for your amazing work on the preactjs project! When I set a complex property (callback) AFTER at least one other property Then the complex property...
The setup: - A small preact-application wrapped in preact-custom-element, accepting three props which all are required by the preact-application. - The resulting custom element is dynamically created and updated inside...
this will allow via configuration the addition of custom events that can be fired outside of the Preact world and consumed by the host page. they include a callback in...
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...
We have a design system with components written in React. I was thinking of rendering those with preact compat and then wrapping those in `preact-custom-element` to be able to use...