Replies: 1 comment
-
Found it. I can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using https://github.com/loop-payments/react-router-relay which takes a relay entry point and will add a loader to the route which loads the query. These queries need to be disposed of when they are no longer used.
There is no "unloader" so what they do is to wrap the route in a HOC that has a useEffect to dispose of it (with some hack to avoid disposal when the component is remounted). There is another issue with this in that if the HOC fails to mount then this query leaks.
I found a bug with this where if there is an error boundary on or above the entry point route then on an error the component will be unmounted, the query disposed of, but then going back to that route will not trigger the loader again and so it will be stuck using a disposed query.
So two questions:
Beta Was this translation helpful? Give feedback.
All reactions