and when an error occurs I'd love to show a dialog sth like this:
<Button onClick={() => getData()}>Get Data</Button>
<Dialog
open={!!error}
onClose={/* how to close the dialog now? */}
>
...content...
</Dialog>
now I'd love to add the onClose handler to let a user close the dialog, but how to do this?
Is making a successful request the only way to clear the error?
I have a
and when an error occurs I'd love to show a dialog sth like this:
now I'd love to add the onClose handler to let a user close the dialog, but how to do this? Is making a successful request the only way to clear the error?