skortchmark9 / reselect-tools

Debugging Tools for Reselect
MIT License
426 stars 24 forks source link

Feature Request: Reset "Recomputations" Count #26

Open parties opened 6 years ago

parties commented 6 years ago

As a user, I want to be able to reset the Recomputations count so that I can see how many recomputations occurred for a particular action within my application.

Current behavior: the Recomputations field continues to grow in size as more and more interactions are triggered.


Note: I do not know if this will require a change to the Reselect Devtools extension or if this is an internal mechanic that is managed by reselect-tools itself (it may be both). If the case is the latter, this issue can be moved to the reselect-tools repo instead.

skortchmark9 commented 6 years ago

Good idea! I totally understand why this would be useful.

Each selector actually has a resetRecomputations() function, so this is doable. I agree it would be nice to have a button in the dev tools to do this. I'll mark it as an enhancement for 0.0.8

In the meantime, it ought to be possible to do this yourself.

import * as selectors from './selectors.js'

Object.values(selectors).forEach((selector) => selector.resetRecomputations());
skortchmark9 commented 5 years ago

Combining the library / extension repos on #24. Thanks!