Invalid Hook Call with >=v1.4.18
See original GitHub issueI am running an iOS (non-web) app on dripsy v1.4.17 but when I upgrade to v1.4.18 or v1.15.16 I get the following error:
[1] | [0] WARN RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
[1] | [0] ERROR Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
[1] | [0] 1. You might have mismatching versions of React and the renderer (such as React DOM)
[1] | [0] 2. You might be breaking the Rules of Hooks
[1] | [0] 3. You might have more than one copy of React in the same app
[1] | [0] See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
[1] | [0]
[1] | [0] This error is located at:
[1] | [0] in ThemeProvider (at provider/index.tsx:33)
[1] | [0] in DripsyProvider (at App.tsx:49)
[1] | [0] in ApolloProvider (at App.tsx:48)
[1] | [0] in App (at renderApplication.js:47)
[1] | [0] in RCTView (at View.js:34)
[1] | [0] in View (at AppContainer.js:107)
[1] | [0] in RCTView (at View.js:34)
[1] | [0] in View (at AppContainer.js:134)
[1] | [0] in AppContainer (at renderApplication.js:40)
Was there something that changed significantly between these two patch-level versions? Any ideas as to what is causing this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Invalid Hook Call Warning - React
Invalid Hook Call Warning. You are probably here because you got the following error message: Hooks can only be called inside the body...
Read more >React hooks: Invalid hook call - Stack Overflow
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of...
Read more >Solving React Hooks' invalid hook call warning - Rob Kendal
Building a React project and have the error 'Hooks can only be called inside the body of a function component'? We'll solve the...
Read more >Invalid hook call #485 - lawnstarter/react-native-picker-select
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of...
Read more >Invalid hook call error - Shakacode
js:1465 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

No I cannot. Apologies for the noise.
It looks like this was a yarn workspace issue that I spent quite a bit of time tracking down. I ended up upgrading to yarn 2 and using
noHoistingLimitsand now no longer have any react-native special-casing for workspaces which is win-win.I was using a vanilla react-native app so I don’t think you can use
expo-yarn-workspaceswith one (I tried at least). I also tried https://www.npmjs.com/package/react-native-yarn-workspaces-v2 which didn’t work either. There were hacks I had to do to make react-native pick up the correct directories and such.Not at all in my situation. It’s the second time I’ve upgraded and I’ve been really happy with it. I followed this guide .