1.0.1 • Published 3 years ago

use-safe-state v1.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

use-safe-state

GitHub license GitHub release PR's Welcome

use-safe-state is an utility hook that wraps around react's useState with the aim to prevent the occuring of the famous Can't perform a React state update on an unmounted component error.

Installation

# Yarn
yarn add use-safe-state

# NPM
npm install use-safe-state --save

Usage

Using use-safe-state is as simple as replacing useState hooks with useSafeState.