This is an interesting method of achieving this feature. I've always used the id attribute to achieve this feature but I guess this way the ref wouldn't get added to the URL.
Hi Favourite Jome! Oh? That's weird, the GIFs are working on my other devices when I checked. Can you try again and let me know?
For React, we use the ref attribute to access DOM elements, not id :)
The Gif showed on my PC, I guess it was a network issue on my phone even though I tried different browsers on my phone.
Oh yes, I do know we make use of ref attribute to access DOM elements, but I meant to say you could achieve the same functionality using the id attribute with anchor elements and some CSS, at least that's how I would have done it.
But for this method, the id value would get added to the browser URL address.