a ES7 decorator to make loading easier

Usage no npm install needed!

<script type="module">
  import reactLoadingDecorator from '';


React loading decorator

A small library that decorates the React render method to simplify loading handling and includes a customizeable loader


npm install react-loading-decorator

In addition to the package you'll need babel-plugin-transform-decorators-legacy and have your babel presets include stage-2

Editor Settings

You'll need to enable experimentalDecorators to work properly

  "javascript.implicitProjectConfig.experimentalDecorators": true,


import { loadingManager } from 'react-loading-decorator'

class App extends React.Component {
  render() {
    const { data } = this.state;
    return (

The loading manager excepts styling props { size: <string or int>, color: <string>, duration: <string or int> }

default props are { size: 10, color: "black", duration: 1.1 }


npm test


In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.