I\'m trying to run this logic when the component is first loaded. I\'m not supposed to be using componentDidMount because I think that only works with class structure?
I\