React Hook, Hooks, React.
axios.get(`https://jsonplaceholder.typicode.com/posts/${id}`) .then(res => { console.log(res) setPost(res.data) }) .catch(error => { console.log(error) }) .finally(() => { console.log(‘always executed’) }) }, [id])//componentDidMount called when id changes in input filed .i.e useEffect() will