Skip to content

Commit

Permalink
Updated basic-export example with app router (#67760)
Browse files Browse the repository at this point in the history
This PR updates the basic-export example to use the App Router. Here are
the changes that have been made:

Renamed the "pages" folder to "app" folder.
Updated the routing for / and /about, files to align with the App
Router.
Added the layout.tsx file as part of the App Router.


cc : @samcx

---------

Co-authored-by: ShruthiKathula <[email protected]>
Co-authored-by: samcx <[email protected]>
  • Loading branch information
3 people committed Jul 15, 2024
1 parent b5331ac commit 7f1a24c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
File renamed without changes.
16 changes: 16 additions & 0 deletions examples/basic-export/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = {
title: "Next.js",
description: "Generated by Next.js",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
File renamed without changes.
19 changes: 10 additions & 9 deletions examples/basic-export/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"private": true,
"scripts": {
"dev": "next",
"dev": "next dev",
"build": "next build",
"start": "serve out"
"start": "serve out",
"lint": "next lint"
},
"dependencies": {
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^18.0.0",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"serve": "^14.2.0",
"typescript": "^4.7.4"
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"serve": "^14.2.3",
"typescript": "^5.5.3"
}
}

0 comments on commit 7f1a24c

Please sign in to comment.