@hnordt/reax-asyncdeprecated

Async HOC for React

Usage no npm install needed!

<script type="module">
  import hnordtReaxAsync from 'https://cdn.skypack.dev/@hnordt/reax-async';
</script>

README

Reax Async

Async HOC for React

npm version

PropTypes

{
  isLoading: PropTypes.bool,
  error: PropTypes.node
}

Usage

npm install --save @hnordt/reax-async
import React from 'react';
import Async from '@hnordt/reax-async';
import Panel from '@hnordt/reax-panel';
import PanelBody from '@hnordt/reax-panel-body';

const AsyncPanel = Async(Panel);

const Foo = () => (
  <AsyncPanel isLoading={true} title="Foo">
    <PanelBody>
      Bar
    </PanelBody>
  </AsyncPanel>
);

export default Foo;