Given this component:
import React from \'react\' import ReactDOM from \'react-dom\' import PropTypes from \'prop-types\' const NewGoalInput = props => {
you could set a useState as the first line inside of your functional component and add a function as "initial value":
const MyComponentName = props => { useState(() => { console.log('this will run the first time the component renders!'); }); return my component!; };