Skip to content

Name time options with a millisecond suffix #536

Description

@hyesungoh

Time options use four names today: wait, delay, timeThreshold and throttleMs. Putting the unit in the name makes each option self-explanatory, and #530 already uses debounceMs, throttleMs and delayMs for the callback and interval hooks.

Rename the remaining options:

  • useLongPress: delay → delayMs
  • useImpressionRef and ImpressionArea: timeThreshold → timeThresholdMs
  • useAvoidKeyboard: transitionDuration → transitionDurationMs
  • useDebouncedValue: wait → debounceMs
  • useThrottledValue: wait → throttleMs
  • useTimeout: delay → delayMs

The first three are option keys and break existing code. The last three are positional parameters, so only types and docs change. useDoubleClick is covered in #535. Update types, docs, and tests.

Waits for #530 and #531.

Activity

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

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