Instead of writing my components inside a class, I\'d like to use the function syntax instead.
How do I override componentDidMount, componentWillM
componentDidMount
componentWillM
if you using react 16.8 you can use react Hooks... React Hooks are functions that let you “hook into” React state and lifecycle features from function components... docs