-
-
+
+
);
}
@@ -921,11 +921,11 @@ export function TasksProvider({ children }) {
const [tasks, dispatch] = useReducer(tasksReducer, initialTasks);
return (
-
-
+
+
{children}
-
-
+
+
);
}
```
@@ -963,11 +963,11 @@ export function TasksProvider({ children }) {
);
return (
-
-
+
+
{children}
-
-
+
+
);
}
@@ -1174,11 +1174,11 @@ export function TasksProvider({ children }) {
);
return (
-
-
+
+
{children}
-
-
+
+
);
}
@@ -1363,4 +1363,3 @@ ul, li { margin: 0; padding: 0; }
- アプリ内で、このようなコンテクストとリデューサのペアを多く作ることができる。
-
diff --git a/src/content/learn/typescript.md b/src/content/learn/typescript.md
index cd11e9b4b..3a7c369df 100644
--- a/src/content/learn/typescript.md
+++ b/src/content/learn/typescript.md
@@ -260,9 +260,9 @@ export default function MyApp() {
const [theme, setTheme] = useState('light');
return (
-
+
-
+
)
}
@@ -310,9 +310,9 @@ export default function MyApp() {
const object = useMemo(() => ({ kind: "complex" }), []);
return (
-
+
-
+
)
}
diff --git a/src/content/reference/react-dom/createPortal.md b/src/content/reference/react-dom/createPortal.md
index d75e43660..13af424db 100644
--- a/src/content/reference/react-dom/createPortal.md
+++ b/src/content/reference/react-dom/createPortal.md
@@ -240,7 +240,11 @@ export default function ModalContent({ onClose }) {
ポータルを使用する際には、アプリを正しくアクセシブルにすることが重要です。例えば、ユーザが自然にポータルの内または外へフォーカスを移動できるよう、キーボードフォーカスを管理する必要があるかもしれません。
+<<<<<<< HEAD
モーダルを作成する際には、[WAI-ARIA のモーダル作成実践ガイド](https://www.w3.org/WAI/ARIA/apg/#dialog_modal)に従ってください。コミュニティパッケージを使用する場合は、それがアクセシブルであり、このガイドラインに従っていることを確認してください。
+=======
+Follow the [WAI-ARIA Modal Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal) when creating modals. If you use a community package, ensure that it is accessible and follows these guidelines.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
diff --git a/src/content/reference/react-dom/static/prerender.md b/src/content/reference/react-dom/static/prerender.md
index 3d611bdab..348a973f4 100644
--- a/src/content/reference/react-dom/static/prerender.md
+++ b/src/content/reference/react-dom/static/prerender.md
@@ -68,7 +68,11 @@ async function handler(request) {
#### 注意点 {/*caveats*/}
+<<<<<<< HEAD
プリレンダー中に `nonce` オプションは利用できません。nonce はリクエストごとに一意である必要があり、[CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) でアプリケーションを保護するために nonce を使用する場合、プリレンダー自体に nonce 値を含めることは不適切かつ危険です。
+=======
+`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
@@ -231,7 +235,7 @@ async function renderToString() {
const {prelude} = await prerender(, {
bootstrapScripts: ['/main.js']
});
-
+
const reader = prelude.getReader();
let content = '';
while (true) {
@@ -317,7 +321,13 @@ async function renderToString() {
### アプリ全体がレンダーされるまでストリームが始まらない {/*my-stream-doesnt-start-until-the-entire-app-is-rendered*/}
+<<<<<<< HEAD
`prerender` の返り値は解決する前に、全サスペンスバウンダリが解決することも含む、アプリ全体のレンダーの終了を待機します。これは事前静的サイト生成 (SSG) のために設計されているものであり、コンテンツを読み込みながらのストリーミングをサポートしません。
コンテンツを読み込みながらストリームしたい場合は、サーバレンダー API である [renderToReadableStream](/reference/react-dom/server/renderToReadableStream) などを使用してください。
-
\ No newline at end of file
+
+=======
+The `prerender` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
+
+To stream content as it loads, use a streaming server render API like [renderToReadableStream](/reference/react-dom/server/renderToReadableStream).
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
diff --git a/src/content/reference/react-dom/static/prerenderToNodeStream.md b/src/content/reference/react-dom/static/prerenderToNodeStream.md
index 8927486f5..0731d9290 100644
--- a/src/content/reference/react-dom/static/prerenderToNodeStream.md
+++ b/src/content/reference/react-dom/static/prerenderToNodeStream.md
@@ -69,7 +69,11 @@ app.use('/', async (request, response) => {
#### 注意点 {/*caveats*/}
+<<<<<<< HEAD
プリレンダー中に `nonce` オプションは利用できません。nonce はリクエストごとに一意である必要があり、[CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) でアプリケーションを保護するために nonce を使用する場合、プリレンダー自体に nonce 値を含めることは不適切かつ危険です。
+=======
+`nonce` is not an available option when prerendering. Nonces must be unique per request and if you use nonces to secure your application with [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) it would be inappropriate and insecure to include the nonce value in the prerender itself.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
@@ -95,7 +99,7 @@ app.use('/', async (request, response) => {
const { prelude } = await prerenderToNodeStream(, {
bootstrapScripts: ['/main.js'],
});
-
+
response.setHeader('Content-Type', 'text/plain');
prelude.pipe(response);
});
@@ -232,7 +236,7 @@ async function renderToString() {
const {prelude} = await prerenderToNodeStream(, {
bootstrapScripts: ['/main.js']
});
-
+
return new Promise((resolve, reject) => {
let data = '';
prelude.on('data', chunk => {
@@ -319,5 +323,9 @@ async function renderToString() {
`prerenderToNodeStream` の返り値は解決する前に、全サスペンスバウンダリが解決することも含む、アプリ全体のレンダーの終了を待機します。これは事前静的サイト生成 (SSG) のために設計されているものであり、コンテンツを読み込みながらのストリーミングをサポートしません。
+<<<<<<< HEAD
コンテンツを読み込みながらストリームしたい場合は、サーバレンダー API である [renderToReadableStream](/reference/react-dom/server/renderToReadableStream) などを使用してください。
+=======
+To stream content as it loads, use a streaming server render API like [renderToPipeableStream](/reference/react-dom/server/renderToPipeableStream).
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
diff --git a/src/content/reference/react/Component.md b/src/content/reference/react/Component.md
index f98d5e57a..086146dd2 100644
--- a/src/content/reference/react/Component.md
+++ b/src/content/reference/react/Component.md
@@ -1814,9 +1814,9 @@ function Form() {
export default function MyApp() {
return (
-
+
-
+
)
}
```
@@ -1900,9 +1900,9 @@ function Form() {
export default function MyApp() {
return (
-
+
-
+
)
}
```
diff --git a/src/content/reference/react/apis.md b/src/content/reference/react/apis.md
index 43b019ea4..4630cafc0 100644
--- a/src/content/reference/react/apis.md
+++ b/src/content/reference/react/apis.md
@@ -10,12 +10,20 @@ title: "React の組み込み API"
---
+<<<<<<< HEAD
* [`createContext`](/reference/react/createContext) を利用すると、子コンポーネントに対してコンテクストを定義および提供できます。[`useContext`](/reference/react/useContext) と一緒に使用されます。
* [`forwardRef`](/reference/react/forwardRef) を利用すると、コンポーネントの DOM ノードを ref として親に公開できます。[`useRef`](/reference/react/useRef) と一緒に使用されます。
* [`lazy`](/reference/react/lazy) を利用すると、コンポーネントのコードの読み込みを初回レンダーまで遅延することができます。
* [`memo`](/reference/react/memo) を利用すると、同じ props を持つコンポーネントの再レンダーをスキップできます。[`useMemo`](/reference/react/useMemo) や [`useCallback`](/reference/react/useCallback) と一緒に使用されます。
* [`startTransition`](/reference/react/startTransition) を使うと、state の更新を低緊急度 (non-urgent) としてマークできます。[`useTransition`](/reference/react/useTransition) に似ています。
* [`act`](/reference/react/act) を使うと、テスト環境でレンダーやユーザ操作をラップして、アサーションを行う前に更新が確実に処理されるようにします。
+=======
+* [`createContext`](/reference/react/createContext) lets you define and provide context to the child components. Used with [`useContext`.](/reference/react/useContext)
+* [`lazy`](/reference/react/lazy) lets you defer loading a component's code until it's rendered for the first time.
+* [`memo`](/reference/react/memo) lets your component skip re-renders with same props. Used with [`useMemo`](/reference/react/useMemo) and [`useCallback`.](/reference/react/useCallback)
+* [`startTransition`](/reference/react/startTransition) lets you mark a state update as non-urgent. Similar to [`useTransition`.](/reference/react/useTransition)
+* [`act`](/reference/react/act) lets you wrap renders and interactions in tests to ensure updates have processed before making assertions.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
---
diff --git a/src/content/reference/react/cloneElement.md b/src/content/reference/react/cloneElement.md
index 1322621a6..ade779e23 100644
--- a/src/content/reference/react/cloneElement.md
+++ b/src/content/reference/react/cloneElement.md
@@ -414,9 +414,9 @@ export default function List({ items, renderItem }) {
{items.map((item, index) => {
const isHighlighted = index === selectedIndex;
return (
-
+
{renderItem(item)}
-
+
);
})}
```
@@ -472,12 +472,12 @@ export default function List({ items, renderItem }) {
{items.map((item, index) => {
const isHighlighted = index === selectedIndex;
return (
-
{renderItem(item)}
-
+
);
})}
diff --git a/src/content/reference/react/createContext.md b/src/content/reference/react/createContext.md
index 23e42d127..daeb7668c 100644
--- a/src/content/reference/react/createContext.md
+++ b/src/content/reference/react/createContext.md
@@ -38,14 +38,22 @@ const ThemeContext = createContext('light');
`createContext` はコンテクストオブジェクトを返します。
+<<<<<<< HEAD
**コンテクストオブジェクト自体は情報を持っていません**。他のコンポーネントが*どの*コンテクストを読み取るか、または提供するかを表します。通常、上位のコンポーネントで [`SomeContext.Provider`](#provider) を使用してコンテクストの値を指定し、下位のコンポーネントで [`useContext(SomeContext)`](/reference/react/useContext) を呼び出してコンテクストを読み取ります。コンテクストオブジェクトにはいくつかのプロパティがあります:
* `SomeContext.Provider` では、コンポーネントにコンテクストの値を提供できます。
* `SomeContext.Consumer` は、コンテクストの値を読み取るための方法ですが、あまり使用されません。
+=======
+**The context object itself does not hold any information.** It represents _which_ context other components read or provide. Typically, you will use [`SomeContext`](#provider) in components above to specify the context value, and call [`useContext(SomeContext)`](/reference/react/useContext) in components below to read it. The context object has a few properties:
+
+* `SomeContext` lets you provide the context value to components.
+* `SomeContext.Consumer` is an alternative and rarely used way to read the context value.
+* `SomeContext.Provider` is a legacy way to provide the context value before React 19.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
---
-### `SomeContext.Provider` {/*provider*/}
+### `SomeContext` Provider {/*provider*/}
コンポーネントをコンテクストプロバイダでラップすると、内部のコンポーネントに対してこのコンテクストの値を指定できます。
@@ -54,14 +62,26 @@ function App() {
const [theme, setTheme] = useState('light');
// ...
return (
-
+
-
+
);
}
```
+<<<<<<< HEAD
#### props {/*provider-props*/}
+=======
+
+
+Starting in React 19, you can render `` as a provider.
+
+In older versions of React, use ``.
+
+
+
+#### Props {/*provider-props*/}
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
* `value`: このプロバイダの内側(深さに関わらず)にあるコンポーネントがコンテクストを読み取る際に、渡したい値です。コンテクストの値は任意の型にすることができます。プロバイダ内で [`useContext(SomeContext)`](/reference/react/useContext) を呼び出しているコンポーネントは、それより上位かつ最も内側にある対応するコンテクストプロバイダの `value` を受け取ります。
@@ -141,11 +161,11 @@ function App() {
// ...
return (
-
-
+
+
-
-
+
+
);
}
```
@@ -187,11 +207,11 @@ import { ThemeContext, AuthContext } from './Contexts.js';
function App() {
// ...
return (
-
-
+
+
-
-
+
+
);
}
```
@@ -213,5 +233,9 @@ const ThemeContext = createContext('light');
この値は決して変わりません。React は、対応するプロバイダを上位のコンポーネントで見つけられない場合にのみ、この値をフォールバックとして使用します。
+<<<<<<< HEAD
コンテクストを時間の経過とともに変化させるには、[state を追加し、コンポーネントをコンテクストプロバイダでラップ](/reference/react/useContext#updating-data-passed-via-context)します。
+=======
+To make context change over time, [add state and wrap components in a context provider.](/reference/react/useContext#updating-data-passed-via-context)
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
diff --git a/src/content/reference/react/legacy.md b/src/content/reference/react/legacy.md
index b3a71c64a..1ba1dd10d 100644
--- a/src/content/reference/react/legacy.md
+++ b/src/content/reference/react/legacy.md
@@ -27,9 +27,18 @@ title: "レガシー React API"
以下の API は React 19 で削除されました。
+<<<<<<< HEAD
* [`createFactory`](https://18.react.dev/reference/react/createFactory): 代わりに JSX を使用してください。
* クラスコンポーネントの [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): 代わりに [`static contextType`](#static-contexttype) を使用してください。
* クラスコンポーネントの [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): 代わりに [`static contextType`](#static-contexttype) を使用してください。
* クラスコンポーネントの [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): 代わりに [`Context.Provider`](/reference/react/createContext#provider) を使用してください。
* クラスコンポーネントの [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): 代わりに [TypeScript](https://www.typescriptlang.org/) などの型システムを使用してください。
* クラスコンポーネントの [`this.refs`](https://18.react.dev//reference/react/Component#refs): 代わりに [`createRef`](/reference/react/createRef) を使用してください。
+=======
+* [`createFactory`](https://18.react.dev/reference/react/createFactory): use JSX instead.
+* Class Components: [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): use [`static contextType`](#static-contexttype) instead.
+* Class Components: [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): use [`static contextType`](#static-contexttype) instead.
+* Class Components: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): use [`Context`](/reference/react/createContext#provider) instead.
+* Class Components: [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): use a type system like [TypeScript](https://www.typescriptlang.org/) instead.
+* Class Components: [`this.refs`](https://18.react.dev//reference/react/Component#refs): use [`createRef`](/reference/react/createRef) instead.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
diff --git a/src/content/reference/react/memo.md b/src/content/reference/react/memo.md
index d9af1812e..0e59e47cf 100644
--- a/src/content/reference/react/memo.md
+++ b/src/content/reference/react/memo.md
@@ -226,12 +226,12 @@ export default function MyApp() {
}
return (
-
+
-
+
);
}
diff --git a/src/content/reference/react/use.md b/src/content/reference/react/use.md
index dbe318a77..0e7bb6188 100644
--- a/src/content/reference/react/use.md
+++ b/src/content/reference/react/use.md
@@ -74,9 +74,9 @@ function Button() {
```js [[1, 3, "ThemeContext"], [2, 3, "\\"dark\\""], [1, 5, "ThemeContext"]]
function MyPage() {
return (
-
+
-
+
);
}
@@ -116,9 +116,9 @@ const ThemeContext = createContext(null);
export default function MyApp() {
return (
-
+
-
+
)
}
diff --git a/src/content/reference/react/useContext.md b/src/content/reference/react/useContext.md
index 571cb8b32..f71003e9a 100644
--- a/src/content/reference/react/useContext.md
+++ b/src/content/reference/react/useContext.md
@@ -38,13 +38,23 @@ function MyComponent() {
#### 返り値 {/*returns*/}
+<<<<<<< HEAD
`useContext` は、呼び出したコンポーネントに対応するコンテクストの値を返します。値は、ツリー内で `useContext` を呼び出したコンポーネントの上位かつ最も近い `SomeContext.Provider` に渡された `value` として決定されます。そのようなプロバイダが存在しない場合は、返り値はそのコンテクストの [`createContext`](/reference/react/createContext) に渡した `defaultValue` になります。返り値は常にコンテクストの最新の値です。React は、コンテクストに変更があると、それを読み取っているコンポーネントを自動的に再レンダーします。
+=======
+`useContext` returns the context value for the calling component. It is determined as the `value` passed to the closest `SomeContext` above the calling component in the tree. If there is no such provider, then the returned value will be the `defaultValue` you have passed to [`createContext`](/reference/react/createContext) for that context. The returned value is always up-to-date. React automatically re-renders components that read some context if it changes.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
#### 注意点 {/*caveats*/}
+<<<<<<< HEAD
* コンポーネントの `useContext()` 呼び出しは、*同じ*コンポーネントから返されるプロバイダの影響を受けません。対応する `` は、`useContext()` を呼び出すコンポーネントの***上*にある**必要があります。
* あるコンテクストのプロバイダが異なる `value` を受け取ると、当該プロバイダより下にありそのコンテクストを使用しているすべての子コンポーネントは、React によって**自動的に再レンダーされます**。前の値と次の値は、[`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) で比較されます。[`memo`](/reference/react/memo) を使って再レンダーをスキップする場合でも、子コンポーネントがコンテクストから新しい値を受け取ることによる再レンダーは妨げられません。
* ビルドシステムが生成する出力の中にモジュールの重複がある場合(シンボリックリンクで起こり得る場合がある)、コンテクストが壊れる可能性があります。コンテクストを介した値の受け渡しが動作するのは、コンテクストを提供するために使用する `SomeContext` と、読み込むために使用する `SomeContext` が、`===` による比較で***厳密*に同じオブジェクト**である場合のみです。
+=======
+* `useContext()` call in a component is not affected by providers returned from the *same* component. The corresponding `` **needs to be *above*** the component doing the `useContext()` call.
+* React **automatically re-renders** all the children that use a particular context starting from the provider that receives a different `value`. The previous and the next values are compared with the [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) comparison. Skipping re-renders with [`memo`](/reference/react/memo) does not prevent the children receiving fresh context values.
+* If your build system produces duplicates modules in the output (which can happen with symlinks), this can break context. Passing something via context only works if `SomeContext` that you use to provide context and `SomeContext` that you use to read it are ***exactly* the same object**, as determined by a `===` comparison.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
---
@@ -70,9 +80,9 @@ function Button() {
```js [[1, 3, "ThemeContext"], [2, 3, "\\"dark\\""], [1, 5, "ThemeContext"]]
function MyPage() {
return (
-
+
-
+
);
}
@@ -98,9 +108,9 @@ const ThemeContext = createContext(null);
export default function MyApp() {
return (
-
+
-
+
)
}
@@ -183,14 +193,14 @@ function Button({ children }) {
function MyPage() {
const [theme, setTheme] = useState('dark');
return (
-
+
-
+
);
}
```
@@ -213,7 +223,7 @@ const ThemeContext = createContext(null);
export default function MyApp() {
const [theme, setTheme] = useState('light');
return (
-
+
-
+
)
}
@@ -317,14 +327,14 @@ const CurrentUserContext = createContext(null);
export default function MyApp() {
const [currentUser, setCurrentUser] = useState(null);
return (
-
-
+
);
}
@@ -411,8 +421,8 @@ export default function MyApp() {
const [theme, setTheme] = useState('light');
const [currentUser, setCurrentUser] = useState(null);
return (
-
-
+
Use dark mode
-
-
+
+
)
}
@@ -596,16 +606,16 @@ export default function MyApp() {
function MyProviders({ children, theme, setTheme }) {
const [currentUser, setCurrentUser] = useState(null);
return (
-
-
+
{children}
-
-
+
+
);
}
@@ -775,11 +785,11 @@ export function TasksProvider({ children }) {
);
return (
-
-
+
+
{children}
-
-
+
+
);
}
@@ -978,9 +988,9 @@ export default function MyApp() {
const [theme, setTheme] = useState('light');
return (
<>
-
+
-
+
+<<<<<<< HEAD
サーバ関数が `"use server"` ディレクティブを付けて定義されると、フレームワークは自動的にそのサーバ関数への参照を作成し、その参照をクライアントコンポーネントに渡します。クライアントでこの関数が呼び出されると、React はサーバにリクエストを送信して元の関数を実行し、その結果を返します。
+=======
+When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the Server Function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
サーバアクションはサーバコンポーネント内で作成し、クライアントコンポーネントに props として渡すことができます。また、クライアントコンポーネントで直接インポートして使用することも可能です。
diff --git a/src/content/reference/rules/components-and-hooks-must-be-pure.md b/src/content/reference/rules/components-and-hooks-must-be-pure.md
index ad6a07f8e..93f928444 100644
--- a/src/content/reference/rules/components-and-hooks-must-be-pure.md
+++ b/src/content/reference/rules/components-and-hooks-must-be-pure.md
@@ -206,8 +206,13 @@ function ProductDetailPage({ product }) {
props と state の値は、レンダーが終わってから更新されるスナップショットと考えることができます。したがって props や state 変数を直接書き換えることはありません。代わりに新しい props を渡すか、あるいはセッタ関数を使用して React に state をコンポーネントの次回レンダー時に更新する必要があると伝えます。
+<<<<<<< HEAD
### props を書き換えない {/*props*/}
props はイミュータブルです。props を変更すると、アプリケーションが一貫性のない出力を生成し、状況によって動作したりしなかったりするためデバッグが困難になるからです。
+=======
+### Don't mutate Props {/*props*/}
+Props are immutable because if you mutate them, the application will produce inconsistent output, which can be hard to debug as it may or may not work depending on the circumstances.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
```js {2}
function Post({ item }) {
@@ -307,7 +312,11 @@ function useIconStyle(icon) {
}
```
+<<<<<<< HEAD
フックの引数を書き換えた場合、カスタムフック内のメモ化が正しく動作しなくなります。これを避けることが重要です。
+=======
+If you were to mutate the Hook's arguments, the custom hook's memoization will become incorrect, so it's important to avoid doing that.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
```js {4}
style = useIconStyle(icon); // `style` is memoized based on `icon`
@@ -327,7 +336,11 @@ style = useIconStyle(icon); // new value of `style` is calculated
## JSX に渡された値はイミュータブル {/*values-are-immutable-after-being-passed-to-jsx*/}
+<<<<<<< HEAD
JSX で使用された後に値を書き換えてはいけません。ミューテーションは JSX が作成される前に行ってください。
+=======
+Don't mutate values after they've been used in JSX. Move the mutation to before the JSX is created.
+>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
式として JSX を使用する際、React はコンポーネントのレンダーが完了する前に JSX を先行して評価してしまうかもしれません。つまり JSX に渡された後で値を変更した場合、React がコンポーネントの出力を更新する必要があることを認識しないため、古い UI が表示され続ける可能性があるということです。
diff --git a/src/pages/errors/[errorCode].tsx b/src/pages/errors/[errorCode].tsx
index a67c5742d..c8cf28ad8 100644
--- a/src/pages/errors/[errorCode].tsx
+++ b/src/pages/errors/[errorCode].tsx
@@ -26,7 +26,7 @@ export default function ErrorDecoderPage({
);
return (
-
+
*/}
-
+
);
}