react-viewport-utils icon indicating copy to clipboard operation
react-viewport-utils copied to clipboard

feat: add support for null values to support react 19 internal type c…

Open LukasGerm opened this issue 9 months ago • 0 comments

PR Description:

This update is essential to ensure compatibility with React 19, particularly addressing changes related to ref types. The modification includes the removal of the deprecated type MutableRefObject.

Context:

Under React 18 and earlier versions, the ref type was defined as follows:

const ref = useRef<HTMLDivElement>(null); // type -> React.RefObject<HTMLDivElement>

With React 19, the ref type has been updated to:

const ref = useRef<HTMLDivElement>(null); // type -> React.RefObject<HTMLDivElement | null>

Related Documentation: For more details, refer to the React 19 Upgrade Guide.

LukasGerm avatar May 12 '25 11:05 LukasGerm