Skip to content

useObjectState setter types incomplete #325

Open
@rmehlinger

Description

@rmehlinger

useObjectState is typed as follows:
export function useObjectState<T>(initialValue: T): [T, (arg: T) => void];

However, like the basic react state setter hook, the useObjectState setter is also capable of taking a callback as an argument, per the documentation at https://usehooks.com/useobjectstate. This is not supported by the current typing, which should be adjusted to allow it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions