1.1.0 • Published 2 years ago

@uploadcare/client-suspense v1.1.0

Weekly downloads
2,630
License
MIT
Repository
-
Last release
2 years ago

сlient-suspense

A hacky way to start using React Suspense in production.

Build Status 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

1.1.0

2 years ago

1.0.5

3 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago