So I am re-writing a component with hooks, and I ran into an interesting challenge, I need to mimick some old behaviour of componentWillReceiveProps with the
You don’t need hooks to handle prerender lifecycle.
Just put the things in the functional component before returning JSX as the function itself is equivalent to render method of class based component.