React Wrappers for PFE #2529
bennypowers
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a short demo showing off semi-automated react wrappers for PFE
https://codesandbox.io/p/sandbox/pfe-react-wrappers-3g6x6r?file=%2Fsrc%2FApp.tsx%3A13%2C1
In the future, these wrappers will be constructed and shipped automatically.
Here's an abridged version of the demo component:
So you can see that from the react dev's perspective, they don't really have to think about custom elements all that much here.
Note that as of this writing the demo brought a potential bug in SlotController to light: hasSlotted does not update the state of the DOM when rendered from React in this way. We will deal with that in a separate issue.
Beta Was this translation helpful? Give feedback.
All reactions