kriasoft / React Decorators
Licence: mit
A collection of higher-order ReactJS components
Stars: ✭ 229
Programming Languages
javascript
184084 projects - #8 most used programming language
React Decorators
A collection of higher-order React components
How to Install
$ npm install react-decorators --save
How to Use
import 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...
Related Projects
Copyright
The MIT License (c) Konstantin Tarkus (@koistya), Kriasoft LLC
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].