fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.35k stars 436 forks source link

Can Link component be given an href for the purposes of SEO? #561

Open atorcode opened 1 year ago

atorcode commented 1 year ago

I'm using the Link component for navbar links. I guess these don't set an href attribute so my lighthouse report is showing that they're bad for SEO. Anyone know the best way around this?

atorcode commented 1 year ago

Currently, I'm resorting to creating an additional anchor element for each Link component just for crawlability, and then hiding them from users and screen readers.

F1L1 commented 1 year ago

@atorcode running into similar issues. Curious how you set metadata descriptions for each of those anchors. Just more hidden text?

jodaka commented 6 months ago

I think for the sake of SEO you can use Button instead of Link. Just add some CSS to remove appearance and border and you are good to go.