vdux-delay

1.0.6 • Public • Published

delay

js-standard-style

Delay the rendering of child components, or execution of an action for a declaratively specified period.

Installation

$ npm install vdux-delay

Usage

function render () {
  return (
    <Hover>
      <SomeHoverableEntity />
      {
        hover => hover && <Delay time={400}><Tooltip message='Explanation of SomeHoverableEntity' /></Delay>
      }
    </Hover>
  )
}

<Tooltip /> is hidden until after the cursor has hovered over <SomeHoverableEntity /> for at least 400 milliseconds.

API - props

  • time - The number of milliseconds to wait
  • onEnd - An action to dispatch when the delay ends (is not dispatched if the component is removed before the timer ends)

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.6
    1
    • latest

Version History

Package Sidebar

Install

npm i vdux-delay

Weekly Downloads

0

Version

1.0.6

License

MIT

Last publish

Collaborators

  • ashaffer88