Skip to content

Add a state hook for change detection over a period of time #113

@kripod

Description

@kripod

Motivation

Inspired by useScrolling of react-use, a generic state wrapper hook (useChanging?) could be added with an optionally specifiable maximum delay between changes.

Basic example

const windowSize = useWindowSize();

// If the value of `windowSize` changes at least every 150ms,
// then `isWindowSizeChanging` should be `true`
const isWindowSizeChanging = useChanging(windowSize, 150);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions