vdux-delay
Declarative delay component for vdux
Last updated 5 years ago by ashaffer88 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vdux-delay 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.6                                ...           latest (5 years ago)

6 Versions

  • 1.0.6                                ...           5 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (12)

Copyright 2014 - 2017 © taobao.org |