DEV Community

Cover image for JS Bites: React hook is called in a function which is neither a React function or [sic] a custom React Hook

JS Bites: React hook is called in a function which is neither a React function or [sic] a custom React Hook

Rane Wallin on September 24, 2019

So, you've decided to dive into React Hooks. Things have been going well (hopefully) until you get a mysterious error similar to the one below. ...
Collapse
 
daveskull81 profile image
dAVE Inden

Great post. I ran into this very problem last week. I was surprised that my searching didn’t turn up a quick answer like this. Great idea on the series. I look forward to more.

Collapse
 
dance2die profile image
Sung M. Kim

This is a nice tip, Rane 🙂

Collapse
 
reythedev profile image
Rey van den Berg

Yay. Such a simple thing. Such a simple solution. I guess I missed them specifying this in the documentation

Collapse
 
samarpanda profile image
Samar Panda

Thanks Rane for this post. It helped me to address this issue.

Collapse
 
acanalez profile image
Alexi Canales

Thank you for the awesome article! I was referencing old code while building a new app. I was so stumped as to why I kept receiving this ambiguous error. Thank you!

Collapse
 
jduttweiler profile image
Jonatan

Thank you Rane!

Collapse
 
sozonome profile image
Agustinus Nathaniel

Thanks so much, really appreciate the explanations

Collapse
 
stevehsu profile image
Steve Hsu

You solved my problem with a quick answer, Thanks Rane!!!

Collapse
 
amkhrjee profile image
Aniruddh Mukherjee

Thanks a ton, Rane!

Collapse
 
txluong profile image
Alexl

TYSM

Collapse
 
seyoongit profile image
seyoongit

Thank you Rane!

Collapse
 
herbowicz profile image
Greg

Thanks Rane, great advice, i needed exactly it.

Collapse
 
marcelolynx profile image
Marcelo Lynx

Thanks Rane, you helped me a lot!

Collapse
 
shnigi profile image
Niki Ahlskog

Thanks, saved a lot of time.

Collapse
 
mannuelf profile image
Mannuel

amazing thank you, saved me from a ton of googling.

Collapse
 
talalsiddiqui profile image
Talal Siddiqui

Wonderfull. Thanks.
This was a very irritating issue. and your post help me a lot.