Invalid hook call
This message shows up in 2 different situations. Pick the one that matches yours:
- Minified React error #310 (and friends) — the SPFx debugging cheatsheet#310/#300/#321/#31/#185 decoded for SPFx debuggingCause and fix →
- A component from a linked package throws "Invalid hook call" in Jest — the test loaded a second copy of ReactJest resolves a file:/junction package by its real path, so the package's require('react') finds a second copy; map react and react-dom to the app's copy (the SPFx build is unaffected — React is a platform component)Cause and fix →