[go: up one dir, main page]

Skip to content

asafda/react-fetch-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Fetch Loader

Higher order component for managing loading state and error state.

Usage Example

Props:

  • fetch: the AJAX call as a promise (required)
  • errorText: text to display on error state

Basic Example:

    <FetchLoader fetch={() => fetch('https://api.github.com/users/asafda')} errorText="Ooops...">
      <DataDisplayer/>
    </FetchLoader>

Installation

Via NPM:

npm install --save react-fetch-loader

Via Yarn:

yarn add react-fetch-loader

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published