DEV Community

Discussion on: React: Creating a Custom Hook for Fetching Data

Collapse
 
pavermakov profile image
Pavel Ermakov

Awesome!

What about the case where you make an async request and immediately switch to another screen? React will complain that it cannot re-render an unmounted component or something like that. Is there a way to cancel the request?

Collapse
 
admantium profile image
Sebastian

I think this is a question for Thành Trang?