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

Why is there a dependency on react? #6672

Closed
francoisromain opened this issue Jul 22, 2020 · 2 comments
Closed

Why is there a dependency on react? #6672

francoisromain opened this issue Jul 22, 2020 · 2 comments

Comments

@francoisromain
Copy link

When I try to install apollo-client and start my app, it makes an error:

This dependency was not found:

* react in ./node_modules/@apollo/client/react/context/ApolloContext.js, ./node_modules/@apollo/client/react/context/ApolloProvider.js and 6 others

I don't use react in this project. Why is it required to install react?

Thank you

@benjamn
Copy link
Member

benjamn commented Jul 22, 2020

I admit it's a little strange that @apollo/client exports useQuery and a few other React-related utilities, when you're not using React. However, we have an entry point called @apollo/client/core for everything except the React stuff (#5541). Try importing from there?

@francoisromain
Copy link
Author

Ok thank you for your quick answer.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants