Skip to content

Commit 40e8512

Browse files
committed
docs: update old comment
1 parent 5952201 commit 40e8512

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ce-la-react.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ export function createComponent<I extends HTMLElement, E extends EventNames>({
237237
// useLayoutEffect produces warnings during server rendering.
238238
if (typeof window !== 'undefined') {
239239
// Set up event listeners on the custom element.
240-
// Only for React 18 and older, React 19+ handles events correctly.
240+
// Still handle events for React 19+ because they don't yet offer
241+
// a way to have nicely camelCased event prop names on custom elements.
241242
for (const propName in eventProps) {
242243
const callback = eventProps[propName as keyof typeof eventProps];
243244
const useCapture = propName.endsWith('Capture');

0 commit comments

Comments
 (0)