react-mousetrap
HOC builder for Mousetrap
Last updated 2 years ago by alvinsj .
SEE LICENSE IN LICENSE · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-mousetrap 
SYNC missed versions from official npm registry.

react-mousetrap Build Status npm version

React's high order component for Mousetrap integration.

Setup

Yarn install

yarn add react-mousetrap

Example

Create higher order component

import mouseTrap from 'react-mousetrap';

class YourComponent extends React.Component {
    /*your implementation */

    componentWillMount {
        this.props.bindShortcut('right', this._goToNext);
    }

    _goToNext() {
        this.props.unbindShortcut('right');
    }
}

export default mouseTrap(BaseComponent);

Current Tags

  • 0.2.0                                ...           latest (2 years ago)

7 Versions

  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 9
Last Day 0
Last Week 0
Last Month 4
Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |