MCPcopy
hub / github.com/kitze/react-hanger / useSet

Function useSet

src/useSet.ts:7–16  ·  view source on GitHub ↗
(initialState: Set<T> = new Set())

Source from the content-addressed store, hash-verified

5export interface UseSet<T> extends UseStateful<Set<T>>, UseSetActions<T> {}
6
7export function useSet<T>(initialState: Set<T> = new Set()): UseSet<T> {
8 const [value, actions] = useSetArray(initialState);
9
10 return useMemo(() => {
11 return {
12 value,
13 ...actions,
14 };
15 }, [actions, value]);
16}

Callers 1

index.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected