refactoring: migrating to react-query to manage service-side state.

This commit is contained in:
a.bouhuolia
2021-02-07 08:10:21 +02:00
parent e093be0663
commit adac2386bb
284 changed files with 8255 additions and 6610 deletions

View File

@@ -1,9 +1,10 @@
import {useRef, useEffect, useMemo } from 'react';
import { useRef, useEffect, useMemo } from 'react';
import useAsync from './async';
import useAutofocus from './useAutofocus';
// import use from 'async';
/**
* A custom useEffect hook that only triggers on updates, not on initial mount
* Idea stolen from: https://stackoverflow.com/a/55075818/1526448
@@ -22,7 +23,6 @@ export function useUpdateEffect(effect, dependencies = []) {
}, dependencies);
}
export function useIsValuePassed(value, compatatorValue) {
const cache = useRef([value]);
@@ -63,9 +63,4 @@ export function useCellAutoFocus(ref, autoFocus, columnId, rowIndex) {
return ref;
}
export {
useAsync,
useAutofocus,
}
export { useAsync, useAutofocus };