Comments (2)
could you please elaborate correctly and tell only required issue details.
from react.
Since you did not elaborate on it too much, I would say that you probably wrote a hook outside the react component as it already is stated in the error. The 2 main rules you need to check in most cases are:
- The hook must be called at the top level.
- Do not call hooks conditionally. Meaning loops, nested functions or conditions.
Most of the time people tend to get this problem when they call the hook conditionally. In other words, inside if else statements, etc. This error is actually pretty easy to solve once you can get your head around the rules of hooks. You just broke one of them, so you just have to spot the place where you did so.
from react.
Related Issues (20)
- Bug:
- Replace "Donate to Ukraine" Banner with "Support Palestine" in ReactJS HOT 5
- useFormStatus only works from within the scope of the form it relates to HOT 8
- Bug: The solution for challenge 2 (Fix a retriggering animation) is an overkill. https://react.dev/learn/removing-effect-dependencies#challenges HOT 4
- Bug: Found an error on React Documentation Site HOT 1
- Bug: Cannot read properties of null (reading 'useState') HOT 6
- [DevTools Bug]: Console.log in second call to useMemo callback in strict mode is not dimmed or suppressed HOT 2
- [DevTools Bug]: `sayHelloToBackendManager` continuously and pointlessly polls on every page HOT 4
- just out of curiosity, why the latest version of task scheduler stop using requestAnimationFrame? Thanks for the answers~ HOT 1
- Bug:
- [DevTools Bug]: There is a problem with the scrollbar in https://react.dev/learn/ HOT 10
- Feature Request: Allow executable `script` tags HOT 4
- [DevTools Bug]: react-devtools depends on vulnerable versions of electron and got HOT 3
- Component passing deep down via context api but supported out of the box HOT 2
- Bug: `use()` Delays Loading in Unrelated Components, Suspense Waits for Unrelated `use()` Calls
- Bug: Controlled `<select>` form cannot enforce the specified "value" on iPad. HOT 2
- The error was thrown at https://ga.jspm.io/npm:[email protected]/standalone.js:51:335451 at ee.emit (https://ga.jspm.io/npm:[email protected]/standalone.js:51:281929) at https://ga.jspm.io/npm:[email protected]/standalone.js:51:283476 at https://ga.jspm.io/npm:[email protected]/standalone.js:51:679409 at Array.forEach (<anonymous>) at Am.$.onmessage (https://ga.jspm.io/npm:[email protected]/standalone.js:51:679392)[DevTools Bug] Cannot add node "1" because a node with that id is already in the Store. HOT 1
- [ReadToPipeableStream] Support { end: false } Options as second param
- [DevTools Bug] Could not find node with id "24823" in commit tree HOT 1
- Bug: Infinite loop with useState and useEffect hooks HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.