Skip to content

Align option names in useDoubleClick, useList, useMap and useSet #535

Description

@hyesungoh

useDoubleClick takes click and doubleClick, while every other callback option starts with on, including onClick in useLongPress. useList, useMap and useSet name their first parameter initialState, while useBooleanState, useCounter, useInputState and useToggle use initialValue.

  • useDoubleClick: click → onClick, doubleClick → onDoubleClick, and delay → delayMs. These are option keys, so this breaks existing code. Shipping them together lets users migrate once.
  • useList, useMap and useSet: initialState → initialValue. It is a positional parameter, so only types and docs change.

Update types, docs, and tests.

Waits for #532.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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