-
-
Save Showrin/db31707e53d4d118ed4ea052a24f47e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StrictMode } from "react"; | |
import ReactDOM from "react-dom"; | |
const rootElement = document.getElementById("root"); | |
const isTure = true; | |
const isFalse = false; | |
const isUndefined = undefined; | |
const isNull = null; | |
function App(props) { | |
return <div className="App">{props.children}</div>; | |
} | |
ReactDOM.render( | |
<StrictMode> | |
<App> | |
<h1>Hello, I am a child</h1> | |
<h2>I am also a child</h2> | |
{isTure && <div>I will be rendered when the first statement is true</div>} | |
{isFalse && <h2>I will be rendered when the first statement is true</h2>} | |
{isUndefined && <h2>I will be rendered when the first statement is true</h2>} | |
{isNull && <h2>I will be rendered when the first statement is true</h2>} | |
</App> | |
</StrictMode>, | |
rootElement | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment