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

Function setUp

tests/useSetState.test.ts:4–4  ·  view source on GitHub ↗
(initialState?: object)

Source from the content-addressed store, hash-verified

2import useSetState from '../src/useSetState';
3
4const setUp = (initialState?: object) => renderHook(() => useSetState(initialState));
5
6it('should init state and setter', () => {
7 const { result } = setUp({ foo: 'bar' });

Callers 1

Calls 1

useSetStateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…