chore: upgrade React to v19 and modernize demo implementation#122
chore: upgrade React to v19 and modernize demo implementation#122harshuljaggi wants to merge 2 commits into
Conversation
**Dependencies:** - Upgrade React from ^17.0.1 to ^19.2.6 - Upgrade React-DOM from ^17.0.1 to ^19.2.6 - Update dev dependencies and build tools: - @babel/preset-react to ^7.28.5 - eslint to ^9.39.4 - prettier to ^3.8.3 - webpack-dev-server to ^5.2.4 - webpack-cli to ^7.0.2 - @tanstack/react-virtual to ^3.13.25 **Demo Improvements:** - Migrate all demo views (async, asyncControlled, asyncManaged, sync) to use React 18+ createRoot API - Update webpack dev server configuration with improved defaults - Enhance async demo patterns with better state management **Core Updates:** - Refactor useRowVirtualizer hook for improved performance - Improve useAsync hook implementation for better async data handling - Optimize Row component rendering logic - Update main index.js exports **Compatibility:** - Maintain backward compatibility with React >=17 as per peerDependencies - Modernize codebase to support latest React 18+ features
|
Hi @NadavShaar, @ilayofir, Hope you're doing well! I hope this PR finds you at a good time. I've been working on modernizing the Quick Summary: This PR upgrades the core dependencies (React v17 → v19.2.6) while maintaining backward compatibility with React >=17. I've also resolved the npm start issues that users were experiencing and migrated the demo applications to use modern React 18+ patterns. What I've focused on:
I've done my best to make this as straightforward as possible with detailed documentation and testing. The PR is ready for review and testing. I’d appreciate your feedback and any suggestions for improvements. Would you be able to take a look when you get a chance? I'm happy to address any feedback or answer any questions you might have. Thanks so much for considering this! Looking forward to your feedback. Cheers, |
🚀 Pull Request: React v19 Upgrade & modernize demo implementation
📋 Description
This pull request modernizes the
react-grid-tablelibrary by upgrading to React v19 and resolving npm startup errors through comprehensive dependency updates. The changes maintain backward compatibility with React >=17 while leveraging modern React patterns in the demo applications.🎯 Objectives
createRootAPI📊 Changes Summary
Files Changed: 10
Commits Included: 2
update dependencies in package.json to resolve npm start errorchore: upgrade React to v19 and modernize demo implementation🔄 Dependency Updates
📝 Detailed Changes
Demo Application Updates (4 files)
Files:
demo/src/views/async.js,asyncControlled.js,asyncManaged.js,sync.jscreateRootAPIReactDOM.render()mergeRowsAtAPIuseReffor better state management in asyncManaged.jsImpact: Demo now uses modern React patterns and requires React 18+
Build Configuration (1 file)
File:
demo/webpack.config.jsCore Library Updates (4 files)
File:
src/hooks/useRowVirtualizer.jsxFile:
src/hooks/useAsync.jsxFile:
src/components/Row.jsxFile:
src/index.jsPackage Configuration (1 file)
File:
package.json✅ Testing Completed
Demo Application Testing
npm start- Sync demo runs without errorsnpm run start-async- Async demo functionalnpm run start-async-controlled- Async controlled demo worksnpm run start-async-managed- Async managed demo functionalBuild Testing
npm run build- Production build successfulnpm run build-demo- Demo build successfulFeature Testing
Compatibility Testing
📦 Backward Compatibility
For Library Users (npm Package Consumers)
✅ No breaking changes
react: >=17For Demo Applications
createRootAPI (React 18+)For Contributors
npm installto get latest dependenciescreateRootAPI pattern for new components🔐 Security & Quality Assurance
🚀 Performance Improvements
📚 Migration Guide
For npm Package Users
No action required. Simply update:
For Local Development
After pulling these changes:
For Contributors Creating New Demo Components
Use the modern
createRootAPI pattern:📝 Related Issues
This PR resolves:
✨ Checklist
💡 Key Points
🎉 Summary
This PR brings
react-grid-tableup-to-date with modern React standards while maintaining the stability and reliability that users depend on. The upgrade is straightforward, well-tested, and backward compatible.📌 Reviewer Notes