DEV Community

Discussion on: Boost Your React Performance: How to Use the useCallback Hook

Collapse
 
akdevcraft profile image
AK DevCraft

Great post! What will happen when I’ll just use regular function and use the dependency array. Will it not avoid re-rendering?

Collapse
 
mazenadel19 profile image
Mazen Emam

Thanks @akdevcraft !
I'm not sure I'm following, what do you mean by "a regular function and use the dependency array", can you give me a code example of that case?

Collapse
 
akdevcraft profile image
AK DevCraft

Lol, laughing on myself. That was an absurd question, this is what happens when I thinks too much😅. Thanks for responding!

Thread Thread
 
mazenadel19 profile image
Mazen Emam

Hahaha, no worries.
Feel free to ask if you have any other question.