Add an "oops!" so skimmers don't mistake the bad example for a good one

This commit is contained in:
Andrew Clark
2018-05-23 16:47:27 -07:00
parent 55b251146d
commit 73006fefa1

View File

@@ -52,7 +52,7 @@ static getDerivedStateFromProps(props, state) {
return {
// Since this method fires on both props and state changes, local updates
// to the controlled value will be ignored, since the props version always
// overrides it.
// overrides it. Oops!
controlledValue: props.value,
};
}