Last active
July 13, 2020 09:32
-
-
Save Aslemammad/2326b9335c6331cb0ef161d8463b63ff to your computer and use it in GitHub Desktop.
Bad example
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 HomePage = () => { | |
const [isDeleteModalOpen, setDeleteModal] = useState(false) | |
const [isConfirmModalOpen, setConfirmModal] = useState(false) | |
return ( | |
<div> | |
<Modal isOpen={isDeleteModalOpen}> | |
Code here... | |
</Modal> | |
<Modal isOpen={isConfirmModalOpen}> | |
Code here... | |
</Modal> | |
Code here... | |
<button onClick={() => setDeleteModal(true)}>Show delete modal</button> | |
<button onClick={() => setConfirmModal(true)}>Show confirm modal</button> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment