Closed binki closed 7 years ago
Can you resolve these conflicts then let me know if the latest changes around setState() have fixed this issue in v1.0.3?
The following lines address issue #9 Don't start any new requests after componentWillUnmount() https://github.com/sheaivey/react-axios/blob/master/src/components/Request.js#L55
Don't set state after async success and error https://github.com/sheaivey/react-axios/blob/master/src/components/Request.js#L76 https://github.com/sheaivey/react-axios/blob/master/src/components/Request.js#L80
@sheaivey I rebased and it looks like it’s passing at least the tests I added for the PR. Thanks!
Great, thanks for the contribution!
This failing test case reproduces the error I reported in #9.
The logic error is that the debounce will call the wrapped function and the wrapped function does not check if the component has been unmounted in the meantime.
This is the repro for #9. The test is expected to fail, as I have not attempted to fix the issue. Please let me know if this repro makes the issue I reported in #9 clear or not.