MCPcopy Create free account
hub / github.com/streamich/react-use / getHook

Function getHook

tests/useStateList.test.ts:9–11  ·  view source on GitHub ↗
(list: any[] = ['a', 'b', 'c'])

Source from the content-addressed store, hash-verified

7 });
8
9 function getHook(list: any[] = ['a', 'b', 'c']) {
10 return renderHook(({ states }) => useStateList(states), { initialProps: { states: list } });
11 }
12
13 it('should return an object containing `state`, `next` and `prev`', () => {
14 const res = getHook().result.current;

Callers 1

Calls 1

useStateListFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…