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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is the useMemo really necessary here?
Yes, memorizing toggler function is important as we pass it down to the component.
If we don't memorize it, would the components we pass the toggle into alway rerender when the toggle rerenders?
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.