React lifecycle hook that logs in console as component transitions through life-cycles.
import {useLogger} from 'react-use';
const Demo = (props) => {
useLogger('Demo', props);
return null;
};
Demo mounted
Demo props updated {}
Demo un-mounted
useLogger(name, props);
name
β component name.props
β latest props.