Amazing post! But If we put a log outside the useEffect hook, the Score component is still getting rendered every time we are entering some text in the player name input field which defeats the purpose of avoiding re-render unnecessarily. Why not use memo along with useCallback?
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.
Amazing post! But If we put a log outside the useEffect hook, the
Score
component is still getting rendered every time we are entering some text in the player name input field which defeats the purpose of avoiding re-render unnecessarily. Why not usememo
along withuseCallback
?