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
Allow returning a null
mapping from a lazy fetch?
#164
Comments
While I think it is better probably handle this in the component, I can also see that returning an empty/null/undefined mapping should probably be a no-op instead of an error. Going to think on it a bit, but we could follow the same pattern as |
@ryanbrainard yup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I'm looking at a use case that isn't covered currently. I've got a handful of different lazy fetches on a settings page, and a few of them are "dangerous" such that they require user confirmation. I was thinking it would be really nice to be able to do:
But right now "aborting" the lazy fetch before it starts by returning
null
throws an error.I realize I could solve this by adding a separate function to the view itself, and handling the confirm there, and then calling into the
props.
function afterwards. But it feels like added complexity, whenreturn null
feels like an elegant solution.What do you think @ryanbrainard?
The text was updated successfully, but these errors were encountered: