|
@ -1,8 +1,8 @@ |
|
|
function logProps(WrappedComponent) { |
|
|
function logProps(WrappedComponent) { |
|
|
class LogProps extends React.Component { |
|
|
class LogProps extends React.Component { |
|
|
componentWillReceiveProps(nextProps) { |
|
|
componentDidUpdate(prevProps) { |
|
|
console.log('old props:', this.props); |
|
|
console.log('old props:', prevProps); |
|
|
console.log('new props:', nextProps); |
|
|
console.log('new props:', this.props); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|