Add a small utility for tracking (and reacting to) repeated events
This commit adds a small utility that allows a consumer to create instances of the stateful occurrence tracker that have a small set of generic tools for tracking and responding to occurrences of something. Example usecases: - Track errors accrued for a given network request (that is not implicitly retried, for example) - Track clicks on a UI element that doesn't need to be global, but is too much to be within a component - Respond to odd occurrences one way, even occurrences differently; without adding that boilerplate to the component
Showing
Please register or sign in to comment