Skip to content

Commit

Permalink
Add warning if is is set and tries to update
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 10, 2023
1 parent d629f8b commit 0bd9a67
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-dom-bindings/src/client/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,14 @@ function setProp(
);
break;
// Properties that should not be allowed on custom elements.
case 'is': {
if (__DEV__ && prevValue != null) {
console.error(
'Cannot update the "is" prop after it has been initialized.',
);
}
break;
}
case 'innerText':
case 'textContent':
if (enableCustomElementPropertySupport) {
Expand Down

0 comments on commit 0bd9a67

Please sign in to comment.