Comments (3)
Good propose!
After reading the doc, it looks ok.
from react-hooks-axios.
If this is to avoid calling setState on unmounted component, this might be simpler.
React.useEffect(() => {
let didCancel = false;
// ...
// you can check didCancel
// before running any setState
// ...
return () => {
didCancel = true;
};
});
Was recommended in discussion here: facebook/react#14369
from react-hooks-axios.
Via 1.1.1
from react-hooks-axios.
Related Issues (18)
- Manage state. HOT 2
- Provide factory to create hook bound to a custom axios instance HOT 3
- Change logic for loading HOT 2
- Request cancelled from unmounted component is trying to set state HOT 1
- using global "window" causing server-side to blow up HOT 7
- Documentation: explain better `trigger` and `filter` HOT 2
- Compiled file contains an extra modules HOT 1
- bug? axios is not optional HOT 3
- Please provide a changelog HOT 2
- Trigger is not optional HOT 2
- How to handle pagination? HOT 3
- allow call of axios when unmounting HOT 2
- POST data is not passing HOT 7
- Not working with React 17 HOT 1
- catch the net::ERR_CONNECTION_TIMED_OUT HOT 1
- Dependencies should be peer dependencies HOT 3
- Rename Params HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-hooks-axios.