Skip to content

useDebouncedState() #38

@EricLambrecht

Description

@EricLambrecht

Status Quo / Problem / Topic
useDebounce() often is used in conjunction with useState(). Combine the two.

Solution
A combination of useDebounce() and useState() called useDebouncedState() (Similar to the already existing useThrottledState()).

API proposal:

const [value, setValue] = useDebouncedState(initialState, debounceTimeMs, options = {})

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