Skip to content

Releases: silverhand-io/react-safe-lazy

v0.1.0

26 Jul 04:26
bec641e
Compare
Choose a tag to compare

A simple and safe way to use React.lazy when you are iterating React app fast. It will catch the error and automatically retry to import or refresh the page when a lazy React component fails to load.

Installation

npm i react-safe-lazy
  • Direct dependencies: 0.
  • Peer dependency: react@^18.0.0.

Usage

Just replace React.lazy with safeLazy and you are good to go.

import { safeLazy } from 'react-safe-lazy';

const MyComponent = safeLazy(() => import('./MyComponent'));

Note

Please check README for more details.

v0.1.0-beta.1

26 Jul 04:21
cb2bc4a
Compare
Choose a tag to compare
v0.1.0-beta.1 Pre-release
Pre-release
release: 0.1.0-beta.1