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
According to the documentation:
import React, { useState, useEffect } from 'react' // Similar to componentDidMount and componentDidUpdate: useEffect(() => { });
see React documentation