MCPcopy Create free account
hub / github.com/testing-library/react-hooks-testing-library / useLoading

Function useLoading

src/__tests__/ssr.test.ts:9–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7// a SSR-like environment.
8describe('renderHook', () => {
9 function useLoading() {
10 const [loading, setLoading] = useState(false)
11 return { loading, setLoading }
12 }
13 runForRenderers(['server'], ({ renderHook }) => {
14 test('should not throw in SSR environment', () => {
15 expect(() => renderHook(() => useLoading())).not.toThrowError('document is not defined')

Callers 1

ssr.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…