Fresh Consulting interview question

How do you write the react lifecycle methods using hooks?