Refactor recoil v4 (#3266)

* Refactor recoil v4

* Fix ci
This commit is contained in:
Charles Bochet
2024-01-05 19:18:22 +01:00
committed by GitHub
parent 8455e15443
commit 96264e264c
140 changed files with 467 additions and 482 deletions

View File

@ -0,0 +1,16 @@
import { atomFamily } from 'recoil';
import { StateScopeMapKey } from '@/ui/utilities/recoil-scope/scopes-internal/types/StateScopeMapKey';
export const createStateScopeMap = <ValueType>({
key,
defaultValue,
}: {
key: string;
defaultValue: ValueType;
}) => {
return atomFamily<ValueType, StateScopeMapKey>({
key,
default: defaultValue,
});
};