Unverified Commit ca9af5bc authored by Sam Ko's avatar Sam Ko Committed by GitHub

chore(examples): update React to stable 19 (#74499)

## Why?

- Update React in reproduction example templates to stable v19
- Switch `.ts` for `next.config`
- Fixes https://github.com/vercel/next.js/issues/74422
parent f25e2127
......@@ -28,9 +28,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# env files (can opt-in for committing if needed)
.env*
# vercel
.vercel
......
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
module.exports = nextConfig;
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
reactStrictMode: true,
};
......
......@@ -7,12 +7,12 @@
},
"dependencies": {
"next": "canary",
"react": "19.0.0-beta-04b058868c-20240508",
"react-dom": "19.0.0-beta-04b058868c-20240508"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "20.4.5",
"@types/react": "18.2.18",
"typescript": "5.1.3"
"@types/node": "^22",
"@types/react": "^19",
"typescript": "^5"
}
}
{
"compilerOptions": {
"target": "es5",
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
......@@ -2,7 +2,7 @@
# dependencies
/node_modules
/.pnp0
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
......@@ -28,9 +28,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# env files (can opt-in for committing if needed)
.env*
# vercel
.vercel
......
export default function RootLayout({ children }) {
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html>
<head />
<html lang="en">
<body>{children}</body>
</html>
);
......
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
reactStrictMode: true,
};
export default nextConfig;
......@@ -11,9 +11,8 @@
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "20.12.12",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"typescript": "5.3.3"
"@types/node": "^22",
"@types/react": "^19",
"typescript": "^5"
}
}
{
"compilerOptions": {
"target": "es5",
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
]
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment