Skip to content

Commit 2faac8e

Browse files
committed
update 01
1 parent d5ca28f commit 2faac8e

File tree

6 files changed

+21
-28
lines changed

6 files changed

+21
-28
lines changed

04-frameworks/08-nextjs/01-config/README.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ const RootLayout = (props: Props) => {
4949
const { children } = props;
5050
return (
5151
<html lang="en">
52-
<body>{children}</body>
52+
<body>
53+
<main>{children}</main>
54+
</body>
5355
</html>
5456
);
5557
};
@@ -64,23 +66,11 @@ _./app/page.tsx_
6466
```jsx
6567
import React from 'react';
6668

67-
interface Props {
68-
children: React.ReactNode;
69-
}
70-
71-
const RootLayout = (props: Props) => {
72-
const { children } = props;
73-
return (
74-
<html lang="en">
75-
<body>
76-
<main>{children}</main>
77-
</body>
78-
</html>
79-
);
69+
const RootPage = () => {
70+
return <h2>Hello from Nextjs</h2>;
8071
};
8172

82-
export default RootLayout;
83-
73+
export default RootPage;
8474
```
8575

8676
Run `start`:

04-frameworks/08-nextjs/01-config/api-server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"author": "Lemoncode",
1010
"license": "MIT",
1111
"dependencies": {
12-
"@hono/node-server": "^1.12.2",
13-
"hono": "^4.5.11"
12+
"@hono/node-server": "^1.13.8",
13+
"hono": "^4.6.20"
1414
},
1515
"devDependencies": {
16-
"tsx": "^4.19.0"
16+
"tsx": "^4.19.2"
1717
}
1818
}

04-frameworks/08-nextjs/01-config/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const RootLayout = (props: Props) => {
88
const { children } = props;
99
return (
1010
<html lang="en">
11-
<body>{children}</body>
11+
<body>
12+
<main>{children}</main>
13+
</body>
1214
</html>
1315
);
1416
};

04-frameworks/08-nextjs/01-config/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

04-frameworks/08-nextjs/01-config/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
"author": "Lemoncode",
1313
"license": "MIT",
1414
"dependencies": {
15-
"next": "^14.2.9",
16-
"react": "^18.3.1",
17-
"react-dom": "^18.3.1"
15+
"next": "^15.1.6",
16+
"react": "^19.0.0",
17+
"react-dom": "^19.0.0"
1818
},
1919
"devDependencies": {
20-
"@types/node": "22.5.4",
21-
"@types/react": "^18.3.5",
22-
"@types/react-dom": "^18.3.0",
23-
"typescript": "^5.6.2"
20+
"@types/node": "22.13.0",
21+
"@types/react": "^19.0.8",
22+
"@types/react-dom": "^19.0.3",
23+
"typescript": "^5.7.3"
2424
}
2525
}

04-frameworks/08-nextjs/01-config/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"target": "ES2017",
34
"lib": [
45
"dom",
56
"dom.iterable",

0 commit comments

Comments
 (0)