mirror of
https://github.com/outline/outline.git
synced 2026-06-25 01:04:24 +03:00
11 lines
203 B
JavaScript
11 lines
203 B
JavaScript
// @flow
|
|
import * as React from "react";
|
|
|
|
export default function usePrevious(value: any) {
|
|
const ref = React.useRef();
|
|
React.useEffect(() => {
|
|
ref.current = value;
|
|
});
|
|
return ref.current;
|
|
}
|