Created
June 7, 2022 14:26
-
-
Save adityatyagi/a87100da0bd53ce022c7925fe6b22db1 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
const App = (props) => { | |
const [showPara, setShowPara] = useState(false); | |
const togglePara = () => { | |
setShowPara((state) => !state); | |
}; | |
return ( | |
<div> | |
<h2>Virtual DOM demo by Aditya Tyagi</h2> | |
<DemoOutput show={showPara} /> | |
<button onClick={togglePara}>Toggle</button> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment