Skip to content

Instantly share code, notes, and snippets.

@adityatyagi
Created June 7, 2022 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adityatyagi/a87100da0bd53ce022c7925fe6b22db1 to your computer and use it in GitHub Desktop.
Save adityatyagi/a87100da0bd53ce022c7925fe6b22db1 to your computer and use it in GitHub Desktop.
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