This content originally appeared on DEV Community and was authored by Baraa Baba
I was working on my portfilio when an error happened about invalid hook calls I tried everything that the error said from trying to check if I am using hooks properly and making sure I don't have two different versions of react also for some reason I tried not to import my components dynamically apparently the error was just I deleted const Card =useRef()
but kept the ref in the jsx and that was it I just have to delete ref={Card}
I feel so stupid lol
my thoughts:
it's partially my fault cause I didn't think right since I already used hooks before without any problem so I had to know that the problem was from the Card and somewhat also react fault
idk tell what you think about this in the comments
This content originally appeared on DEV Community and was authored by Baraa Baba

Baraa Baba | Sciencx (2022-05-05T00:14:14+00:00) It took me two hours to fix a really simple problem. Retrieved from https://www.scien.cx/2022/05/05/it-took-me-two-hours-to-fix-a-really-simple-problem/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.