atlas-react-fetch-loaderdeprecated

A HOC React component that enables other components to remotely fetch data from an endpoint

Usage no npm install needed!

<script type="module">
  import atlasReactFetchLoader from 'https://cdn.skypack.dev/atlas-react-fetch-loader';
</script>

README

Expression Atlas React Fetch Loader

Build Status Coverage Status

A HOC React component that enables other components to remotely fetch data from an endpoint.

Usage

import withFetchLoader from 'atlas-react-fetch-loader'
import MyComponent from 'my-component'

const MyComponentFoo = withFetchLoader(MyComponent)

<MyComponentFoo
  host={`https://domain.tld/path/`}
  resource={`json/endpoint`}
  {...passThroughProps} />

Be aware that fields in the JSON data overwrite values passed in as props.