You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't found any obvious way to reset the async state to its initial state (so that isInitial returns true).
I need this manly because of how dialogs work in the material UI library. I currently use a useEffect to clear all other states of the dialog when it is opened, but there is not a way to do this to the async state, so I'm always left with the state of the last operation.
I advocate adding a reset() function to the AbstractState that takes care of this. Would this be an acceptable way of accomplishing this and be accepted in the project?
The text was updated successfully, but these errors were encountered:
I haven't found any obvious way to reset the async state to its initial state (so that
isInitial
returnstrue
).I need this manly because of how dialogs work in the material UI library. I currently use a
useEffect
to clear all other states of the dialog when it is opened, but there is not a way to do this to the async state, so I'm always left with the state of the last operation.I advocate adding a
reset()
function to theAbstractState
that takes care of this. Would this be an acceptable way of accomplishing this and be accepted in the project?The text was updated successfully, but these errors were encountered: