DEV Community

Discussion on: Never call a React function component

Collapse
 
evgenyorekhov profile image
Evgeny Orekhov

The way we’re calling Item, is not a component at all, but a function. React cannot associate any useState calls to the Item function, just because it’s not rendered as a component.

Been banging my head against the wall for an hour. You saved my day, thank you!

Collapse
 
francodalessio profile image
Franco D'Alessio

I'm glad it helped! Thanks to you for leaving a comment :D