Given this component:
import React from \'react\' import ReactDOM from \'react-dom\' import PropTypes from \'prop-types\' const NewGoalInput = props => {
To simulate constructor in FC use useEffect.
useEffect(() => { ... here your init code }, []);
That's it! EZ! This useEffect runs only once when the component loads and never runs after, just don't forget to add square brackets at the end.