-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Currently, we make a metrics request every pollingInterval, but if we navigate away from a certain page, there's no way to indicate that we don't need the data from that request anymore. This causes the returned data to trigger a setState when we're not using that component anymore, triggering react warnings (#157).
We should:
- wrap our fetches in a cancellable promise
- cancel any current requests and issue a new metrics request as soon as the metricsWindow changes (button click)
Helpful article:
https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
This will fix #157.
Reactions are currently unavailable