How to identify which component mounted / unmounted? #6690
|
I am using react instantsearch v7. I get this message when I perform an action on my UI: I have Q1 - How do I know widget was removed that resulted in the above message getting displayed? Somewhat related - I am using Q2 - Could the above warning about mounting / unmounting of widget trigger the useHits() component? I am guessing it has to but just want to be sure of my debugging skills / direction I am taking to find the bug. |
Replies: 1 comment 3 replies
|
This warning gets given on launch of InstantSearch, not on the first time a widget unmounts (which probably would be correct). What do you mean with the useHits gets updated? do you mean you did a rerender of the component that caused useHits to be evaluated again? If you don't see a network request happening, it makes sense and it's still going to display the same hits unless you changed the filter or the query. If you have an example that shows the issue, we can look at what's going on in detail |
This warning gets given on launch of InstantSearch, not on the first time a widget unmounts (which probably would be correct).
What do you mean with the useHits gets updated? do you mean you did a rerender of the component that caused useHits to be evaluated again? If you don't see a network request happening, it makes sense and it's still going to display the same hits unless you changed the filter or the query.
If you have an example that shows the issue, we can look at what's going on in detail