Browse Source

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

main
Andrew Clark 7 years ago
parent
commit
73006fefa1
  1. 2
      content/blog/2018-05-23-react-v-16-4.md

2
content/blog/2018-05-23-react-v-16-4.md

@ -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,
};
}

Loading…
Cancel
Save