編集の要約なし
タグ: 手動差し戻し
編集の要約なし
タグ: visualeditor
1行目: 1行目:
[[ファイル:react-logo.png|thumb|React|300px]]
[[ファイル:react-logo.png|thumb|React|300px]]


とにかく、公式Learn を読む。
* [https://react.dev/learn Quick Start]
* [https://react.dev/learn Quick Start]



2026年6月25日 (木) 13:48時点における版

ファイル:react-logo.png
React

とにかく、公式Learn を読む。

Pick UP

? operator など、Conditional rendering を使う。<syntaxhighlight lang="jsx" line="1">// if statement let content; if (isLoggedIn) {

 content = <AdminPanel />;

} else {

 content = <LoginForm />;

} return (

   {content}

);

// ? operator

 {isLoggedIn ? (
   <AdminPanel />
 ) : (
   <LoginForm />
 )}

</syntaxhighlight>When you don’t need the else branch, you can also use a shorter logical && syntax:<syntaxhighlight lang="jsx" line="1">

 {isLoggedIn && <AdminPanel />}

</syntaxhighlight>

Next.js

Next.js を参照。