import React from 'react'
componentDidMount(){
fetch(`https://jsonplaceholder.com/users/`)
.then(res => res.hson())
.then(res => {
.console.log(res)
})
}
const App = () => {
return (
<h1>Hello</h1>
)
}
export default App;
How to make api call in react function based view.
Here it is saying componentDidMount not found.
Is there any way to make api call using function based view.
Please have a look