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

Function clone

src/array/useSet.ts:12–12  ·  view source on GitHub ↗
(value: Set<T>)

Source from the content-addressed store, hash-verified

10export type UseSet<T> = [Set<T>, UseSetActions<T>];
11
12const clone = <T>(value: Set<T>) => new Set<T>(value);
13
14export function useSet<T>(initialState: Set<T> = new Set()): UseSet<T> {
15 const [value, setValue] = useState(initialState);

Callers 1

useSetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected