Skip to content

Commit ce258b7

Browse files
authored
Fix description of named import (#637)
1 parent 9b8ee29 commit ce258b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/3-web-servers/03-module/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ console.log(add(3, 4));
9191

9292
:::tip[名前付きエクスポート]
9393

94-
上のように**デフォルトエクスポート**を使うと各モジュールで複数の関数をエクスポートすることができません。その場合は、**名前付きエクスポート**を用いることができます。[**分割代入**](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)の記法を用いることで、オブジェクトからプロパティを取り出して変数に代入する操作を簡潔に記述しています。
94+
上のように**デフォルトエクスポート**を使うと各モジュールで複数の関数をエクスポートすることができません。その場合は、**名前付きエクスポート**を用いることができます。
9595

9696
```javascript title="sub.mjs"
9797
export function add(a, b) {

docs/4-advanced/04-react/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,13 +524,13 @@ export default function App() {
524524

525525
:::tip[配列の分割代入]
526526

527-
オブジェクトと同じように、配列でも分割代入の記法を用いることができます。先ほどのプログラムにおいて
527+
先ほどのプログラムにおいて
528528

529529
```tsx
530530
const [count, setCount] = useState(0);
531531
```
532532

533-
は、次のように動作します。
533+
は、[**分割代入**](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)という記法であり、次のように動作します。
534534

535535
```tsx
536536
const useStateResult = useState(0);

0 commit comments

Comments
 (0)