-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error: Invalid hook call. Using latest React Version #301
Comments
simenandre
added a commit
that referenced
this issue
Oct 24, 2020
simenandre
added a commit
that referenced
this issue
Oct 24, 2020
github-actions bot
pushed a commit
that referenced
this issue
Oct 24, 2020
## [1.1.2](v1.1.1...v1.1.2) (2020-10-24) ### Bug Fixes * Move react, react-dom to peerDependencies ([b4fd437](b4fd437)), closes [#301](#301)
🎉 This issue has been resolved in version 1.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Mar 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Install a new CRA project
npx create-react-app test-app --template typescript
Install react-oidc
yarn add oidc-react
Create a new react component
Routes.tsx
file (OIDC Config copied from https://github.com/cobraz/example-oidc-react/blob/master/src/App.tsx) and add<Routes />
toApp.tsx
Start the app
yarn start
Expected behaviour
The app should load and I should be redirected to the Google authority page https://accounts.google.com
Actual behaviour
The app does not load instead displaying the error Error: Invalid hook call. (full error below)
Note
If I remove
<AuthProvider {...oidcConfig}>
from theRoutes.tsx
file the app loadsAlso if I change the react and react-dom version in
package.json
torun
yarn install
andyarn start
the app loads and I am redirected to the Google authority page https://accounts.google.com
Full Error
The text was updated successfully, but these errors were encountered: