Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boundless-async

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boundless-async

A higher-order component for rendering data that isn't ready yet.

  • 1.0.0-beta.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD.

Async

A higher-order component for rendering data that isn't ready yet.

There are plenty of situations where you need to fetch content to be displayed, but want to show some sort of loading graphic in the interim. This component helps to simplify that pattern by handling common types of promises and providing a simple mechanism for materializing the resolved data into JSX.

Props

Note: only top-level props are in the README, for the full list check out the website.

Required Props

There are no required props.

Optional Props

NameTypeDefault ValueDescription
contentRenderedFunc
function
() => {}
a callback for when real content has been rendered; either normal passed data or when a passed promise resolves
convertToJSXFunc
function
(x) => x
a function that takes the resolved payload of a promise provided by `props.data` and returns renderable JSX; defaults to trying to render the resolved value of the Promise
data
any
null
a promise, or some other piece of data to be run through `props.convertToJSXFunc`
errorContent
any renderable
'⚠️'
content to be shown if the promise is rejected
loadingContent
any renderable
null
content to be shown while the promise is in pending state

Keywords

FAQs

Package last updated on 26 Jan 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc