lndsld

Home > @lndsld/react-hooks > usePrevious

usePrevious() function

Get value from previous render

Signature:

declare function usePrevious<T>(value: T): T | undefined;

Parameters

Parameter Type Description
value T current value

Returns:

T | undefined

value from previous render