DEV Community

Discussion on: 🍦 Cancel Properly HTTP Requests in React Hooks and avoid Memory Leaks 🚨

 
viclafouch profile image
Victor de la Fouchardière

I want to have a function for getting my data. Maybe in the future I would like to have a button to "refresh" my data. And call "fetchPosts" by clicking on it. Or maybe, for my future pagination by adding page as a new parameter of my function fetchPosts.