Adding an id to React/Gatsby component for hash link
问题 I have a link in a nav-bar that takes me to an anchor on the index page. Currently I don't know how to put an id onto the component, so I have to wrap the component in a div and give it an id for it to work. Ideally, I would like to simply put the anchor on the component itself. This works fine for me, but I'm wondering if this is the way to do an anchor with React/Gatsby or is there a better way? //Navbar, which is part of Layout export default class NavBar extends Component { render() {