How to add componentDidMount() to a custom component

This may be more of a babel or a react.js question, but I have code that needs to run after the custom component loads, but I am unsure where to place componentDidMount() in the babel code. Any help would be appreciated.

<script type="text/babel">
const MyCustomComponent = ({ triggerQuery, model, modelUpdate }) => (
  <div className="card">
  \\ component code...
 </div>
)
const ConnectedComponent = Retool.connectReactComponent(MyCustomComponent)
const container = document.getElementById('react')
const root = ReactDOM.createRoot(container)
root.render(<ConnectedComponent />)
</script>

Hi @mofvanes!

Thanks for reaching out! I believe you need to use useEffect:

:crossed_fingers: Let me know how it goes