Skip to content

upgrade: react 19 #363

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

rajaadubey
Copy link

Title: Upgrade React Intersection Observer to React 19

Description
This pull request upgrades the react-intersection-observer library from React 17 to React 19. The upgrade involved several key changes:

Component Refactoring: Converted the IntersectionObserver component back to a class-based implementation to ensure compatibility with server-side rendering (SSR), which is not fully supported by functional components in React 19.
TypeScript Enhancements: Updated TypeScript configurations and type definitions to resolve compatibility issues and ensure type safety with the latest React and TypeScript versions.
Dependency Updates: Updated the package.json to reflect the latest versions of React, React DOM, and other dependencies, ensuring compatibility and leveraging new features.
Motivation and context
The upgrade to React 19 is crucial for maintaining compatibility with the latest React ecosystem. It addresses deprecated features, enhances performance, and prepares the library for future improvements. This change resolves existing compatibility issues and aligns the library with modern React practices.

How has this been tested?
The changes have been rigorously tested in a controlled development environment:

Unit Tests: Comprehensive unit tests were executed to verify the functionality of all components and ensure they behave as expected with React 19.
Integration Testing: The library was integrated into a sample application to test real-world scenarios and interactions.
Manual Testing: Extensive manual testing was conducted to ensure SSR compatibility and correct behavior of the Intersection Observer API across different browsers and environments.
Screenshots (if relevant):
N/A

Type of change
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project
[x] My change requires a change to the documentation
[x] I have updated the documentation accordingly
[x] I have read the CONTRIBUTING document
[x] I have added tests to cover my changes
[x] All new and existing tests passed

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.

1 participant