Closed alex35mil closed 5 years ago
Whats the use case of: mapSubmissionError? When would you like to map submission error?
Whats the use case of: mapSubmissionError? When would you like to map submission error?
@baransu I usually animate server errors and it requires additional movements to persist error data on a screen while unmounting. So my animated error type looks like this:
type submissionError = {
error: Api.Error.t(CreatePasswordResetTokenMutation.Error.t),
shown: bool,
};
And I map it to flip shown
flag before removal from state to trigger unmounting animation when user dismisses error.
Got it, thanks!
For me this change is really good 🙂
Fixes #48