Skip to content
JS
React error

React error #252

The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a...

Reference entryReactFetched
The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.
As listed by React error codes

%s is filled in by React at runtime.

Category
Minified React error
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: React error codes. Data fetched 2026-09-25T01:43:12.927Z.