mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
refactoring: migrating to react-query to manage service-side state.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user