Socket
Book a DemoInstallSign in
Socket

@uploadcare/client-suspense

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uploadcare/client-suspense

> A hacky way to start using React Suspense in production.

latest
npmnpm
Version
1.1.0
Version published
Weekly downloads
2K
-23.32%
Maintainers
2
Weekly downloads
 
Created
Source

сlient-suspense

A hacky way to start using React Suspense in production.

[![Build Status][build-img]][build-link] NPM version

In short, Suspense allows you to defer rendering part of your application tree until some condition is met (for example, some data are loaded).

While React Suspense is still in experimental mode and not suitable for production, this package provides an easy-to-use production-ready alternative.

Install

npm i @uploadcare/client-suspense
yarn add @uploadcare/client-suspense

Usage

import { Suspense, lazy } from '@uploadcare/client-suspense'

const LazyComponent = lazy(() => import('@uploadcare/react-widget'))

<Suspense fallback='loading...'>
  <LazyComponent />
</Suspense>

▶ Demo Sandbox

FAQs

Package last updated on 29 Apr 2022

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