Implemented kanban board page with lists of issues
This commit is contained in:
14
client/src/shared/hooks/deepCompareMemoize.js
Normal file
14
client/src/shared/hooks/deepCompareMemoize.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useRef } from 'react';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
function useDeepCompareMemoize(value) {
|
||||
const valueRef = useRef();
|
||||
|
||||
if (!isEqual(value, valueRef.current)) {
|
||||
valueRef.current = value;
|
||||
}
|
||||
|
||||
return valueRef.current;
|
||||
}
|
||||
|
||||
export default useDeepCompareMemoize;
|
||||
Reference in New Issue
Block a user