Skip to content

Commit

Permalink
Merge pull request #799 from katayamahide/issue/795
Browse files Browse the repository at this point in the history
誤植「create-react-appでは」→「yarn create react-appでは」 #795
  • Loading branch information
suin authored Dec 15, 2023
2 parents d20328f + c6d7b94 commit 08e6cd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/component-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ test("ボタンをクリックするとON/OFFの表示が切り替わる", async
今回の例もボタンを描画した後、「`OFF`と表示されている」という状態確認から始まり、「クリック」という操作を施した後、再び「`ON`と表示されている」という状態確認をします。みなさんが自分でコンポーネントのテストを書く際も、どのような操作と状態確認を行えばよいかを意識することでテスト作成がスムーズにできるはずです。
:::

まずはボタンを描画してみましょう。コンポーネントの描画は`@testing-library/react``render()`を使って、次のようにするだけです。なお、この`@testing-library/react`というライブラリは、今回`create-react-app`でReactアプリケーションを作成したためすでにプロジェクトにインストールされています。
まずはボタンを描画してみましょう。コンポーネントの描画は`@testing-library/react``render()`を使って、次のようにするだけです。なお、この`@testing-library/react`というライブラリは、今回`yarn create react-app`でReactアプリケーションを作成したためすでにプロジェクトにインストールされています。

```tsx twoslash {1,2,5} title="SimpleButton.test.tsx"
// @noErrors
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npm install -g yarn

## Next.jsをセットアップする

最初に`create-next-app`コマンドでプロジェクトを作成します。TypeScriptをベースにしたプロジェクトを作成するために `--example with-typescript` を指定します。`random-cat` はリポジトリ名となる部分です。この部分は好きな名前でも構いませんが、本チュートリアルでは`random-cat`として話を進めます。
最初に`yarn create next-app`コマンドでプロジェクトを作成します。TypeScriptをベースにしたプロジェクトを作成するために `--example with-typescript` を指定します。`random-cat` はリポジトリ名となる部分です。この部分は好きな名前でも構いませんが、本チュートリアルでは`random-cat`として話を進めます。

```sh
yarn create next-app --example with-typescript random-cat
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/react-like-button-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ cd ./like-button
└── yarn.lock
```

create-react-appではReactのインストールも自動で行われます。インストールされたReactのバージョンを確認するには次のコマンドを用います。
`yarn create react-app`ではReactのインストールも自動で行われます。インストールされたReactのバージョンを確認するには次のコマンドを用います。

```sh
yarn list react
Expand Down

1 comment on commit 08e6cd4

@vercel
Copy link

@vercel vercel bot commented on 08e6cd4 Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.