I think you used the wrong term in the part about useEffect. It says to pass an empty array, but you're passing an empty object. It might catch someone off guard and scratch their head (which is a good thing, but might not be in this case, hahah)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.