Introduce ComponentState (#4386)
* Proof of concept ComponentState * Migrate to createState and createFamilyState * Refactor * Fix * Fix tests * Fix lint * Fix tests * Re-enable coverage
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { atomFamily } from 'recoil';
|
||||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState';
|
||||
|
||||
export const cursorFamilyState = atomFamily<string, string | undefined>({
|
||||
export const cursorFamilyState = createFamilyState<string, string | undefined>({
|
||||
key: 'cursorFamilyState',
|
||||
default: '',
|
||||
defaultValue: '',
|
||||
});
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import { atomFamily } from 'recoil';
|
||||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState';
|
||||
|
||||
export const hasNextPageFamilyState = atomFamily<boolean, string | undefined>({
|
||||
export const hasNextPageFamilyState = createFamilyState<
|
||||
boolean,
|
||||
string | undefined
|
||||
>({
|
||||
key: 'hasNextPageFamilyState',
|
||||
default: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { atomFamily } from 'recoil';
|
||||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState';
|
||||
|
||||
export const isFetchingMoreRecordsFamilyState = atomFamily<
|
||||
export const isFetchingMoreRecordsFamilyState = createFamilyState<
|
||||
boolean,
|
||||
string | undefined
|
||||
>({
|
||||
key: 'isFetchingMoreRecordsFamilyState',
|
||||
default: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user