Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Moreタスク] 自由にページを増やしてみましょう!!! #22

Open
takumi12311123 opened this issue Oct 10, 2024 · 0 comments

Comments

@takumi12311123
Copy link
Member

takumi12311123 commented Oct 10, 2024

ページを増やすための手順

  1. src/pages/の中にファイルを増やしましょう e.g) example.jsx
  2. ブランチ名: feature/add-example-page exampleのところは追加するページのタイトルにしてくださいね!
  3. 作成したファイルの中で、Componentを作成しましょう!
+ export default function Example() {
+   return <div></div>;
+ }
  1. それを、/index.jsで使いましょう!
+import Example from "./pages/Example" 
+
+{
+   path: "/example",
+   element: <Example />,
+},
  1. そうすると、右のURLにアクセスできるようになるよ!!  http://localhost:3000/example

Tip

ファイル名と、Component名と、pathの名前は統一しよう!
困ったらメンターを呼んでね!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant