Last active
September 19, 2022 07:02
-
-
Save ElhamFadel/aaccbdd9e46c0ecccebda6a17023d41f 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 useToggle from "./useToggle"; | |
function App() { | |
const {getTogglerProps,isToggle} = useToggle(); | |
return ( | |
<div className="App"> | |
//after | |
<button {...getTogglerProps()}>Click here</button> | |
{ | |
isToggle?<h1>Hiiiiiiiii Geeks</h1> :null | |
} | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment