React-apollo: refetch prop of Query doesn't trigger loading state

Created on 1 Nov 2018  路  2Comments  路  Source: apollographql/react-apollo

I noticed that calling refetch doesn't set loading to true in the Query component's children function.

Most helpful comment

Just checking, but don't you need to pass the notifyOnNetworkStatusChange prop to Query component? Because otherwise your component won't get rerendered on network status change and you won't be able to proprely detect loading state.

e.g.

 <Query>
     query={query}
     notifyOnNetworkStatusChange={true}
    >

All 2 comments

Just checking, but don't you need to pass the notifyOnNetworkStatusChange prop to Query component? Because otherwise your component won't get rerendered on network status change and you won't be able to proprely detect loading state.

e.g.

 <Query>
     query={query}
     notifyOnNetworkStatusChange={true}
    >

This doesn't seem to be an issue, so I'll close it for now. Happy to re-open if there is still a problem here. Thanks!

Was this page helpful?
0 / 5 - 0 ratings