Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

TS2339: Property 'loading' does not exist on type 'DataValue<Response, Variables> | undefined'. #2705

Closed
Thullner opened this issue Jan 1, 2019 · 5 comments
Labels
bug docs Focuses on documentation changes

Comments

@Thullner
Copy link

Thullner commented Jan 1, 2019

I keep getting the following errors:

image

I copied the code from the tutorial (https://www.apollographql.com/docs/react/recipes/static-typing.html):

image

Version

  • apollo-client@2.4.8
  • react-apollo@2.3.3
  • typescrypt@3.2.2
@Thullner Thullner changed the title Error TS2339: Property 'loading' does not exist on type 'DataValue<Response, Variables> | undefined'. Jan 1, 2019
@JoviDeCroock
Copy link
Contributor

I think your destructuring at the bottom should be: ({ loading, error, data : { hero } })

@rosskevin rosskevin added bug docs Focuses on documentation changes labels Jan 7, 2019
@tkolsen
Copy link

tkolsen commented Jan 8, 2019

I have the same problem. The destructuring in the docs and the one sugested by @JoviDeCroock does not work.

@tigrus
Copy link

tigrus commented Jan 15, 2019

Any updates/solutions about this error?

@rosskevin
Copy link
Contributor

FYI - PRs for docs should be in the apollo-client repo - src https://github.com/apollographql/apollo-client/tree/master/docs

@danilobuerger
Copy link
Contributor

See apollographql/apollo-client#4340 for fix.

hwillson pushed a commit to apollographql/apollo-client that referenced this issue Jan 22, 2019
* docs: Type the graphql hoc in recipes

Fixes apollographql/react-apollo#2705

* Changelog updates
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug docs Focuses on documentation changes
Projects
None yet
Development

No branches or pull requests

6 participants