Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some sort of withDefault for the failure state #38

Open
jouderianjr opened this issue Apr 8, 2020 · 0 comments
Open

Some sort of withDefault for the failure state #38

jouderianjr opened this issue Apr 8, 2020 · 0 comments

Comments

@jouderianjr
Copy link

The combo of RemoteData.map plus RemoteData.map is really common and useful. I just faced a situation that I would want to do the same, but caring about the Failure instead of Success case.

I have some typed error that I decode from the request and that I map to the Failure, then having the combo RemoteData.map plus RemoteData.withDefaultForError (something like that with a better name) It would be really nice. Do you think it worth adding to the library? I can handle with this modification.

@jouderianjr jouderianjr changed the title Some sort of withDefaultForError Some sort of withDefault for the failure state Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant