Skip to content
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

Use function declaration for WithApolloClient example #9977

Conversation

charpeni
Copy link
Contributor

@charpeni charpeni commented Aug 2, 2022

While reading through the docs, I noticed two things.

  • We don't need to import react here and aren't doing it in other places, let's unclutter the example.
  • We are using function declarations everywhere for React components except for this WithApolloClient component, which could be confusing as the example doesn't need an arrow function.

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@jpvajda
Copy link
Contributor

jpvajda commented Aug 5, 2022

@charpeni Thanks for the PR and catching this inconsistency in our Docs! 🥳

@jpvajda jpvajda self-assigned this Aug 5, 2022
@jpvajda jpvajda merged commit 0cd1406 into apollographql:main Aug 5, 2022
PowerKiKi pushed a commit to PowerKiKi/apollo-client that referenced this pull request Aug 30, 2022
@charpeni charpeni deleted the hooks-use-function-declaration-for-withapolloclient branch September 26, 2022 18:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants