ファイル: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 を参照。