DEV Community

Discussion on: Implement your own custom hook in React with typescript

Collapse
 
polaroidkidd profile image
Daniel Einars

If we don't memorize it, would the components we pass the toggle into alway rerender when the toggle rerenders?

Thread Thread
 
atbrakhi profile image
Rakhi

If you want to check, if a component is rendering or not rendering, you can use console.count() in the component/hook file and check the results in console.