This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 787
Automatically handle loading and failure renders #268
Comments
You can simply create component/decorator with this functionality based on loading property |
@seeden thanks, but that's something to add on every component? What I mean is that specific handling loading/error cases should be something opt-in. In general shouldn't need to think about that for each and every component, IMHO things should "just work" like in Relay. |
@sedubois what if you don't want to use it because you want to show something else? |
@sedubois you need to use graphql that means you can use your own instead of graphql which will use graphql inside your own component. But I agree it will be nice to have it in the graphql too |
closing in favor of #272 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi and apologies again if this is documented somewhere, couldn't track it down. If possible, documentation would be needed.
It seems Apollo requires to manually handle cases when data is not yet available in a view, or when a failure occurs, leading to more boilerplate/bloat code.
Like in Relay, it should be possible for the developer to just "forget" about loading and failure cases and trust that a view is rendered only when data is available. (Of course, with the option of being able to configure custom failure and error rendering.)
The text was updated successfully, but these errors were encountered: