Use @lit/react to build React components instead of doing it manually ourselves
Closed this issue · 4 comments
daneah commented
The problem
Managing the React components is a maintenance burden and prone to error. Doing this ourselves incurs a whole area of work around duplicating component stories for React and building a composed Storybook, all of which add complexity and get in the way often.
The solution
- Use the offical
@lit/react
package to build the React components for consumers - Document what to expect about component property names and event handling
- Stop managing a React Storybook altogether
- Stop managing a composed Storybook
daneah commented
custom-element-react-wrappers
is another alternative if it proves useful/necessary
Niznikr commented
Something to note: https://react.dev/blog/2024/04/25/react-19#support-for-custom-elements
daneah commented
I saw that as well and shared around internally @Niznikr, exciting development! Thanks for sharing 😄
daneah commented
Closing this as an unlikely area of investment going forward; we will likely divest from React wrappers instead as teams eventually move up to React 19.