| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A collection of higher-order React components
$ npm install react-decorators --saveimport React from 'react';
import withViewport from 'react-decorators/withViewport';
@withViewport
class MyComponent {
render() {
let { width, height } = this.props.viewport;
return <div>Viewport: {width + 'x' + height}</div>;
}
}
React.render(<MyComponent />, document.body);More decorators coming soon...
The MIT License (c) Konstantin Tarkus (@koistya), Kriasoft LLC
| Back | FazBrowse Home | New Git URL |