File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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"
9797export function add (a , b ) {
Original file line number Diff line number Diff line change @@ -524,13 +524,13 @@ export default function App() {
524524
525525:::tip[ 配列の分割代入]
526526
527- オブジェクトと同じように、配列でも分割代入の記法を用いることができます。 先ほどのプログラムにおいて
527+ 先ほどのプログラムにおいて
528528
529529``` tsx
530530const [count, setCount] = useState (0 );
531531```
532532
533- は、次のように動作します。
533+ は、[ ** 分割代入 ** ] ( https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment ) という記法であり、 次のように動作します。
534534
535535``` tsx
536536const useStateResult = useState (0 );
You can’t perform that action at this time.
0 commit comments