reload maps every time the select map modal is opened

This commit is contained in:
Mitchell McCaffrey
2020-04-26 17:12:15 +10:00
parent fbdb68596e
commit a07b95ec2d
4 changed files with 40 additions and 24 deletions

View File

@@ -0,0 +1,11 @@
import { useEffect, useRef } from "react";
function usePrevious(value) {
const ref = useRef();
useEffect(() => {
ref.current = value;
}, [value]);
return ref.current;
}
export default usePrevious;