You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic is already mostly shared between the two implementations. This would allow importing React components and using them as Web Components. The major difference would be defining if the Shadow DOM should be used or not. This would effectively make it so you would only ever need to import Component, and then use the result immediately in a Custom Element definition.
This is possible thanks to the great suggestion by @rniwa found in here: WICG/webcomponents#587. If the component has been registered with customElements we can automatically put the component in "web" mode. This means that function components will work as well! There will be a single package/build to handle function components (stateless, stateful, and web) and class components (stateful and web). Very cool!
There is more work to do, but they are unified now in master and I will continue to improve so that the performance and expectations are met. Right now class components inherit from HTMLElement which is not correct as only Web Components should.
The logic is already mostly shared between the two implementations. This would allow importing React components and using them as Web Components. The major difference would be defining if the Shadow DOM should be used or not. This would effectively make it so you would only ever need to import
Component
, and then use the result immediately in a Custom Element definition.The text was updated successfully, but these errors were encountered: