use-reducer-async icon indicating copy to clipboard operation
use-reducer-async copied to clipboard

Why a different AbortController logic in 2.1.1?

Open maikeriva opened this issue 2 years ago • 1 comments
trafficstars

Hi Daishi Kato! Thanks for this handy hook :)

I'm diving into the code, and I'm struggling to understand the reasoning behind the modifications you did to the AbortController logic in 2.1.1 (commit f335dda38a4a336fc709c7fc88558788c6eda8d8) . I read in the changelog that they are related to some compatibility with React 18, can you be more explicit about that? It feels like there would be no need of an additional state variable for the AbortController, but obviously I am missing something as that was indeed the case before.

Thanks for any insights!

maikeriva avatar May 24 '23 05:05 maikeriva

#35 description might help. It didn't work with strict effect.

For more information: https://react.dev/reference/react/StrictMode#fixing-bugs-found-by-re-running-effects-in-development

dai-shi avatar May 24 '23 06:05 dai-shi