mirror of
https://github.com/plankanban/planka.git
synced 2025-12-21 01:11:26 +03:00
12 lines
201 B
JavaScript
12 lines
201 B
JavaScript
|
|
import { useEffect, useRef } from 'react';
|
||
|
|
|
||
|
|
export default (value) => {
|
||
|
|
const prevValue = useRef();
|
||
|
|
|
||
|
|
useEffect(() => {
|
||
|
|
prevValue.current = value;
|
||
|
|
}, [value]);
|
||
|
|
|
||
|
|
return prevValue.current;
|
||
|
|
};
|