Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@ebi-gene-expression-group/atlas-react-fetch-loader
Advanced tools
A HOC React component that enables other components to remotely fetch data from an endpoint
A HOC React component that enables other components to remotely fetch data from an endpoint.
import { withFetchLoader } from '@ebi-gene-expression-group/atlas-react-fetch-loader'
import MyComponent from 'my-component'
const FetchLoadMyComponent = withFetchLoader(MyComponent)
<FetchLoadMyComponent
host={`https://domain.tld/path/`}
resource={`json/endpoint`}
{...passThroughProps} />
Be aware that fields in the JSON data overwrite values passed in as props.
By default, if there’s an error fetching the remote data, instead of the wrapped component an
alert Callout will be rendered with a brief description of the
underlying error (this is to conform to the EBI Visual Framework). If you
want to handle the error yourself you can pass an errorPayloadProvider
function prop; it takes an error object as its
only argument and returns an arbitrary object which will be destructured and added to the pass-through props. This is
especially useful if e.g. you’d like to render an error message within your wrapped component using info such as the
error code or a message supplied by the server.
The error object has the following shape:
interface Error {
description: string;
name: string;
message: string;
}
There is a similar prop, loadingPayloadProvider
, to replace the animated loading message with your own component. In
this case, however, the function has no arguments. As a matter of fact it could be an object, but as a function it’s
consistent with errorPayloadProvider
.
FAQs
A React HOC that enables other components to remotely fetch data from an endpoint
The npm package @ebi-gene-expression-group/atlas-react-fetch-loader receives a total of 2 weekly downloads. As such, @ebi-gene-expression-group/atlas-react-fetch-loader popularity was classified as not popular.
We found that @ebi-gene-expression-group/atlas-react-fetch-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.