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
In my app, when server returns an error, we display it to the user like this:
The rationale to display it above the Login button and not below is to avoid the risk of users not seeing the error message on narrow screens.
If the user submits the form again at this point, the error is set to null (and isError is set to false) resulting in an unwanted UI jump because the error isn't shown while the request is in progress.
It would be nice to have an option not to reset the error until we get the response to avoid the UI jump.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In my app, when server returns an error, we display it to the user like this:
The rationale to display it above the Login button and not below is to avoid the risk of users not seeing the error message on narrow screens.
If the user submits the form again at this point, the
error
is set tonull
(andisError
is set tofalse
) resulting in an unwanted UI jump because the error isn't shown while the request is in progress.It would be nice to have an option not to reset the error until we get the response to avoid the UI jump.
What do you think?
CodeSandbox playground
Beta Was this translation helpful? Give feedback.
All reactions