I'm trying to create an onboarding or three modal series with React + MUI. Basically after the button within the modal is clicked it will go to the next modal. I've looked at packages but they are complex for my use case. What's the best way to accomplish this? I can try updating the current state of modal to close and updating another modal state to open at the same time, is that possible?
const [open, setOpen] = React.useState(false);
const [openTwo, setOpenTwo] = React.useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false).setOpenTwo(true);
<Modal
open={openTwo}
onClose={handleClose}>
{Modal content here
</Modal>