keybinding-decorator
Decorator for Keybinding
keybinding-decorator is using Mousetrap.
Decorators offer a convenient declarative syntax to modify the shape of class declarations.
see: https://tc39.github.io/proposal-decorators/
You must use babel-plugin-transform-decorators-legacy
.
Install
$ npm install keybinding-decorator --save
Usage
;;; Component { super; thisstate = current: '' ; // init Reflect; Reflect; } @ { this; } @ { this; } { thisesc; thiscsk; } { return <div>current: thisstatecurrent</div>; } const root = <Main />; ReactDOM;
Method
unbind()
A method binded by decorator
has unbind
method.
Release this function from Mousetrap.