Skip to content

Conversation

@iamdarshshah
Copy link
Collaborator

@iamdarshshah iamdarshshah commented Dec 22, 2025

🚀 React 17 Migration (v7.0.0)

This PR modernizes the library to support React 17 as the minimum version, along with updating the entire toolchain to current standards.

What Changed

React & Dependencies

  • Bumped peerDependencies to React 17.0.0+
  • Updated devDependencies to React 17.0.2
  • Switched to the new JSX transform ("jsx": "react-jsx") — no more import React needed in every file

Testing & Tooling

  • Upgraded Jest from v24 → v29
  • Updated @testing-library/react to v12.1.5 (last version supporting React 17)
  • Modernized Husky to v9 (new .husky/ directory setup)
  • Pinned lint-staged to v15 for Node 18 compatibility

CI/CD & Node.js

  • Updated GitHub Actions to test on Node 18.x, 20.x, and 22.x
  • Dropped Node 16 support (EOL since September 2023)
  • Added engines.node: ">=18.18.0" to enforce minimum version

Why This Matters

React 16 reached end-of-life, and the ecosystem has moved on. By setting React 17 as our baseline:

  • We can use modern React patterns and the new JSX transform
  • Our dependencies stay compatible with actively maintained versions
  • Users on React 18+ are fully supported (React 17 APIs are forward-compatible)

Breaking Changes

Before (v6) After (v7)
React 16+ React 17+
Node 12+ Node 18.18.0+

Migration Guide

If you're on React 16, you'll need to upgrade to React 17 or later before using v7 of this library:

npm install react@17 react-dom@17

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.33%. Comparing base (b48b0ae) to head (17cc499).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
+ Coverage   75.46%   79.33%   +3.87%     
==========================================
  Files           2        2              
  Lines         163      150      -13     
  Branches       61       56       -5     
==========================================
- Hits          123      119       -4     
- Misses         16       24       +8     
+ Partials       24        7      -17     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iamdarshshah iamdarshshah changed the title chore: upgrade to React 17+ with v7.0.0 release chore: upgrade to React 17 with v7.0.0 release Dec 22, 2025
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