Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 1
    Is the dispatch doing something that would cause the component to unmount and remount? (e.g. parent going into a loading state). You could return a cleanup function that just logs something to the console and set a breakpoint in it to see what's going on at that moment. (This is not as straightforward as it sounds due to the layers of abstractions and decoupling between your component and React's rendering process.) Commented Sep 8, 2020 at 22:45