Web Components in React
summary
Demonstrates integrating a real vanilla colorful hex color picker into React: builds the component in CodeSandbox, wires attributes vs properties via useRef and useEffect, and binds the custom color-changed DOM event with addEventListener to read event.detail.value. Shows property reflection and state sync, then replaces the boilerplate with @lit-labs/react’s createComponent wrapper to get a working React component in seven lines. Everything runs in the demo.
AI-written summary · about
chapters (6)
- 0:00Intro
- 1:40Color Picker
- 6:35Event listeners
- 9:40Attributes and properties
- 13:08Lit Labs React
- 16:05Discussion
related talks
25mReact x Web Components : How It Is and How It Could Be
44mWeb Components An Introduction to the Future
40mWeb Components: It’s about Time
20mI’m With Web Components and Web Components Are With Me
45mReact Web Components How It Is and How It Could Be
01h 04mWhat makes React different?
38mWriting highly reusable React components
24mIndividual paint for your React components
