Skip to content

Commit 50e08d4

Browse files
committed
Merge pull request #3627 from spicyj/mut-warn-clone
Refer to cloneElement in mutation warning
2 parents b6756c5 + 05f6e7d commit 50e08d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/classic/element/ReactElementValidator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ function warnForPropsMutation(propName, element) {
302302

303303
warning(
304304
false,
305-
'Don\'t set .props.%s of the React component%s. ' +
306-
'Instead, specify the correct value when ' +
307-
'initially creating the element.%s',
305+
'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
306+
'correct value when initially creating the element or use ' +
307+
'React.cloneElement to make a new element with updated props.%s',
308308
propName,
309309
elementInfo,
310310
ownerInfo

0 commit comments

Comments
 (0)