Skip to content

useUnmount

Category
Export Size
118 B
Last Changed
5 days ago

Runs a callback when the component unmounts.

Demo

Usage

tsx
import { 
useUnmount
} from '@reause/shared'
useUnmount
(() => cleanup())

Type Declarations

ts
export function useUnmount(fn: () => any): void

Source

Source · Demo · react-use

Contributors

hairyf

Changelog

v0.1.0 on
c380f - fix(shared): resolve useUnmount audit findings (#759)

Released under the MIT License. v0.1.8