I found that I never (literally, zero times) used current payload but do use domain specific error types all the time and put those in component state. With generic version it's still possible to use currently hardcoded type by defining it in user land but it would make it more flexible for other use-cases. I wonder how others use it (if use it at all).
I'm thinking of making payload of
FormStatus.SubmissionFailed
constructor generic, i.e. turn this:into this:
I found that I never (literally, zero times) used current payload but do use domain specific error types all the time and put those in component state. With generic version it's still possible to use currently hardcoded type by defining it in user land but it would make it more flexible for other use-cases. I wonder how others use it (if use it at all).