FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

kriasoft/react-decorators: A collection of higher-order ReactJS components · GitHub

Repository navigation

About

A collection of higher-order ReactJS components

Resources

Stars

224 stars

Watchers

7 watching

Forks

Repository files navigation

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

About

A collection of higher-order ReactJS components

Resources

Stars

224 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL