Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LukasGerm
Copy link

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.

@@ -1,6 +1,6 @@
{
"name": "react-viewport-utils",
"version": "2.0.2",
"version": "2.0.3",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please never update the version in the commit. This happens automatically when a new version is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants