Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd networkStatus prop to connected components #322
Comments
This comment has been minimized.
This comment has been minimized.
@cannoneyed FYI, the |
This comment has been minimized.
This comment has been minimized.
I would like to implement this functionality since my app depends on it. @jbaxleyiii @cannoneyed @helfer Is anybody working on it now? |
This comment has been minimized.
This comment has been minimized.
@wizardzloy I'm starting to look into this now. |
wzrdzl
referenced this issue
Nov 15, 2016
Merged
Feature: Add networkStatus to props of the connected components #327
This comment has been minimized.
This comment has been minimized.
@helfer @wizardzloy So what I've found so far is that there seems to be some work needed in This is an interesting situation. On the one hand, it totally makes sense that a |
This comment has been minimized.
This comment has been minimized.
nicolo-paganin
commented
Nov 26, 2016
•
+1 this feature will be very useful |
This comment has been minimized.
This comment has been minimized.
@cannoneyed I think we can implement this kind of tracking internally in Apollo Client and expose it just through a |
This comment has been minimized.
This comment has been minimized.
czert
commented
Dec 14, 2016
@helfer It would be for mine :) |
This comment has been minimized.
This comment has been minimized.
czert
commented
Mar 31, 2017
We've had the Is this a known effect of some other change that I missed, or should I open an issue for this? |
This comment has been minimized.
This comment has been minimized.
@czert are you using the query option |
This comment has been minimized.
This comment has been minimized.
czert
commented
Apr 7, 2017
@helfer thanks, I wasn't using the new |
This comment has been minimized.
This comment has been minimized.
networkStatus is included in props now |
cannoneyed commentedNov 11, 2016
Steps to Reproduce
When fetching more data, using a pattern identical to that proposed in the docs, the
loading
prop that is passed down to the wrapped component isfalse
afterfetchMore
is invoked.Buggy Behavior
It seems the
loading
prop is only ever tied to the initial load of data. For simple components that don't need to update or paginate, this is fine. However, the workaround for this (managing refetch / loadMore status with local component state) is not ideal.Expected Behavior
The following PR apollographql/apollo-client#707 in apollo client exposes a
networkStatus
object for handling the status of non-initial-load network requests, such as refetch, fetchMore, and subscriptions.It would be very nice to have the
networkStatus
object exposed as a prop to wrapped components (perhaps if specified as an option), so that paginated / more complex query operations loading/error state can be managed by the react-apollo wrapper rather than using local ad-hoc local component state.Version