Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-stately/src/utils/useControlledState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import React, {SetStateAction, useCallback, useEffect, useReducer, useRef, useSt

// Use the earliest effect possible to reset the ref below.
const useEarlyEffect: typeof React.useLayoutEffect =
typeof document !== 'undefined'
typeof document !== 'undefined' || parseInt(React.version, 10) >= 19
? (React['useInsertionEffect'] ?? React.useLayoutEffect)
: () => {};

Expand Down