@ -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,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user