mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
10 lines
243 B
JavaScript
10 lines
243 B
JavaScript
// After
|
|
class ExampleComponent extends React.Component {
|
|
// highlight-range{1-5}
|
|
componentDidUpdate(prevProps, prevState) {
|
|
if (this.props.isVisible !== prevProps.isVisible) {
|
|
logVisibleChange(this.props.isVisible);
|
|
}
|
|
}
|
|
}
|