chore: upgrade to react 19 react-to-print v3#40
Open
saurabhraghuvanshii wants to merge 3 commits intolayer5io:masterfrom
Open
chore: upgrade to react 19 react-to-print v3#40saurabhraghuvanshii wants to merge 3 commits intolayer5io:masterfrom
saurabhraghuvanshii wants to merge 3 commits intolayer5io:masterfrom
Conversation
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
Rajesh-Nagarajan-11
approved these changes
Apr 4, 2026
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes for Reviewers
package.json
Dev command fixed
###React ecosystem upgraded
react-to-print upgraded
2.15.1 -> 3.3.0ajv added in devDependencies
⚙️ webpack.config.js Updates
Removed Deprecated / Broken Options
NamedModulesPlugin(Webpack 4 era, crashes in Webpack 5)disableHostCheckinlinedevServer.statsESLintWebpackPlugin(incompatible with ESLint v10 flat config)Added Modern Dev Server Settings
Screencast.From.2026-04-01.17-11-43.mp4
examples/Router/index.js
Migrated router API
Updated route syntax
Kept class component working
-- Why: class component can’t directly use hooks.
Made mount target safer
document.getElementById('app-root') || document.getElementById('root')
Why: avoids blank page if one id is missing.
src/components/TableToolbar.js
Print feature was updated for new react-to-print version.
Old print implementation replaced
Removed old ...
Added useReactToPrint with a small helper component PrintTableButton
-- Why: v3 uses hooks API instead of old render-prop API.
Runtime crash fix
useReactToPrint({}) instead of useReactToPrint()
Why: v3 destructures options; undefined caused:
Cannot destructure property 'bodyClass' of 'undefined'
Signed commits