Create a higher order function that accepts a react component. Do logs when life cycle methods (componentWillReceiveProps or render) are called
F1.js
export function hocF (Component) {
const cwp = Component.prototype.componentWillReceiveProps;
Component.prototype.componentWillReceiveProps = function(...args) {
console.log('in Component will receive props....')
cwp.call(this, ...args)
}