signals icon indicating copy to clipboard operation
signals copied to clipboard

Bug: Rendered more hooks than during the previous render.

Open betula opened this issue 2 years ago • 2 comments

I attached archive with small project on Vite that reproduced error:

react-rendered-more-hooks.zip

https://github.com/preactjs/signals/assets/421161/a0e472d7-2311-46dc-9bd7-bc56a24ee184

betula avatar Jun 07 '23 15:06 betula

I am not sure if it is related but might help someone looking for a solution to a similar problem.

I also had a "Rendered more hooks than during the previous render" error. This error showed in Chrome but not in Firefox. Running code in Firefox turend out I had another valid issue with my code: "Each child in a list should have a unique "key" prop".

As soon as I solved this error, "Rendered more hooks than during the previous render" error was also solved.

LaiArturs avatar Jan 03 '24 18:01 LaiArturs