Basically we do API calls in componentDidMount()
life cycle method in React class components like below
componentDidMount(){
//Here we do API call and do setState accordingly
}
But after hooks are introduced in React v16.7.0, its all like functional components mostly
My query is, where exactly do we need to make API call in functional component with hooks?
Do we have any method for it similar like componentDidMount()
?