apollo-client icon indicating copy to clipboard operation
apollo-client copied to clipboard

Moves the React hooks entrypoint from @apollo/client to @apollo/client/react

Open MrDoomBringer opened this issue 3 years ago • 1 comments

See this milestone for more information: https://github.com/apollographql/apollo-client/issues/8190

This PR aims to remove the react entrypoint from @apollo/client and have it accessible only through @apollo/client/react.

  • Adjusts @apollo/client and @apollo/client/react accordingly
  • Adds an @apollo/testing/react entrypoint, used primarily for MockedProvider
  • Includes a basic codemod to help move react hook imports out of /client and into client/react
  • Includes a basic migration guide, currently only including information about this change
  • Updates all AC React docs

Checklist:

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

MrDoomBringer avatar Jul 25 '22 19:07 MrDoomBringer

Super excited about this! Let us know when you think this is ready for review @MrDoomBringer - thanks!

hwillson avatar Jul 29 '22 00:07 hwillson

@MrDoomBringer 👋 can this be merged in now?

jpvajda avatar Sep 01 '22 16:09 jpvajda

@jpvajda Yup! Just waiting for an approval review now :-)

MrDoomBringer avatar Sep 02 '22 04:09 MrDoomBringer