feat: React 19 / Next 16 support (INTER-2317)#203
Open
JuroUhlar wants to merge 4 commits into
Open
Conversation
Widen the react peer range to >=18 <20, verify the SDK against React 19 via a second CI matrix job (catalog stays pinned to 18 as the default dev/test toolchain), and bump the Next.js examples to 16.2.10. Add @next/eslint-plugin-next lint rules scoped to the Next examples instead of eslint-config-next, since the latter bundles eslint-plugin-react which only supports ESLint below version 10. Re-add the two @eslint-react rule overrides for React 19-only idioms so linting stays green under both supported versions.
Contributor
Coverage report
Test suite run success22 tests passing in 15 suites. Report generated by 🧪jest coverage report action from ffc711f Show full coverage report
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK and example apps to support React 19 and Next.js 16, adds CI coverage for React 19, and adjusts linting/TypeScript settings to keep the repo green under the new toolchain constraints.
Changes:
- Expand
reactpeer dependency range to>=18 <20and update README requirements accordingly. - Upgrade Next.js example apps to Next.js
16.2.10and apply the TypeScript config changes Next recommends (moduleResolution: bundler,jsx: react-jsx,target: es2020). - Add a React 19 CI job and scope Next.js ESLint rules to the two Next examples via
@next/eslint-plugin-next.
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates documented React requirement to “React 18 or 19”. |
| package.json | Widens React peer range; adjusts lint to avoid ignored-file warnings; adds @next/eslint-plugin-next. |
| pnpm-lock.yaml | Locks new Next.js 16 + lint plugin dependency graph. |
| eslint.config.mjs | Adds Next.js example-only lint rules; ignores regenerated Next next-env.d.ts; reintroduces React 19-related rule overrides for src/ + tests. |
| examples/next/package.json | Bumps Next.js to 16.2.10 in the pages-router example. |
| examples/next/tsconfig.json | Aligns TS settings with Next 16 defaults and modernizes compilation target. |
| examples/next/next-env.d.ts | Updates Next-generated TS env file (now references generated typed-routes file). |
| examples/next-appDir/package.json | Bumps Next.js to 16.2.10 in the app-router example. |
| examples/next-appDir/tsconfig.json | Aligns TS settings with Next 16 defaults and includes additional generated type paths. |
| examples/next-appDir/next-env.d.ts | Updates Next-generated TS env file (now references generated typed-routes file). |
| .github/workflows/ci.yml | Adds a second CI job that installs React 19 into the workspace for SDK checks. |
| .changeset/react-19-next-16-support.md | Records a minor release for React 19 / Next 16 support. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Next.js 16 requires Node >=20.9.0; declare it explicitly so contributors on older Node get a clear engine error instead of a confusing runtime failure.
no-html-link-for-pages (and other core-web-vitals rules) default to looking for pages/app at the repo root, so they silently no-op since both Next examples live under examples/. Set settings.next.rootDir to point at them explicitly.
Contributor
TheUnderScorer
approved these changes
Jul 17, 2026
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.
Summary
reactpeer range to>=18 <20; add CI jobbuild-and-check-react-19that overrides the pnpm catalog to React 19 for build/lint/test/test:dts (React 18 stays default).examples/nextandexamples/next-appDirto Next.js 16.2.10 (tsconfigmoduleResolution/jsxupdated bynext build;targetcleaned up toes2020).eslint-config-nextwith@next/eslint-plugin-next(the former bundleseslint-plugin-react, incompatible with this repo's ESLint 10), scoped to the two Next examples, withsettings.next.rootDirset so its rules actually findpages/appinstead of silently no-op'ing.@eslint-reactoverrides (no-use-context,no-context-provider) for React 19-only idioms, scoped tosrc//__tests__/.examples/next-appDir/README.md.Manual verification
pnpm build/lint/test/test:dtsgreen under both React 18 and React 19 (CI job's override run locally).next,next-appDir,vite,create-react-app,webpack-based,preact(doesn't usereactat all, so version doesn't apply there).Known gap: the CI React-19 job only bumps the root SDK package, not the examples, so example behavior under React 19 is verified manually here but not continuously in CI. Real CI coverage (build/typecheck per example) is a bigger change and will follow in a separate PR.