DEV Community

Discussion on: Your next React Modal with your own "useModal" Hook & Context API.

Collapse
 
rhysnicholls profile image
Rhys Nicholls • Edited

Hi Alex. Excellent tutorial which has helped me alot and I have a follow up question
I'm wanting to close the modal using a button nested inside of modalContent passed to handleModal.
How would I go about this?
I have tried using handleModal for the onClick of the button but nothing happens.
This may be a hole in my knowledge

Collapse
 
alexandprivate profile image
Alex Suarez

Hi there Rhys sorry for the late response, let's revamp the article to show that use case, I will address that part in a section with you question

Collapse
 
alexandprivate profile image
Alex Suarez

Done Rhys, article updated!