Last active
February 22, 2022 13:53
-
-
Save rujmah/b201a0ab9c639297116192ab8df982e9 to your computer and use it in GitHub Desktop.
Quick and yucky vanilla code to test CRA react app
This file contains hidden or 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 { useState } from "react"; | |
const App = () => { | |
const [onOffStatus, setOnOffStatus] = useState(false); | |
return ( | |
<div className="App" style={{ margin: "1rem" }}> | |
<header className="App-header"> | |
<h1>Seriously, this is a React App</h1> | |
</header> | |
<main> | |
<div | |
className="clickButtonDiv" | |
style={{ fontSize: "35pt", margin: "5rem" }} | |
> | |
<label htmlFor="on-off">{onOffStatus ? "🔥" : "❄️"}</label> | |
<input | |
style={{ transform: "scale(3)", margin: "30px" }} | |
type="checkbox" | |
name="on-off" | |
id="onoff" | |
defaultChecked={onOffStatus} | |
onChange={() => setOnOffStatus(!onOffStatus)} | |
/> | |
</div> | |
</main> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment