Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
xigoi
· 3y ago · 0 comments
Why would you use a component for something that's already a built-in HTML element?
Comments
[–]
bryanrasmussen
3y ago
I don't know, but a consulting company saddled us with a monstrosity that does exactly this.
Maybe it's some sort of lock-in feature.
[–]
seedboot
3y ago
One example is if I was using react it would be used to encapsulate a react-router Link and an anchor tag in a component, and use props to differentiate between inbound and outbound links.
[–]
peferron
3y ago
Why would you style an anchor element when your browser already has default styles for it?
[–]
xigoi
OP
3y ago
Because you want it to look different, such as the color being consistent with the rest of your website?