@reach/router Renders To A Div
Check out the following snippet that uses @reach/router
.
When you visit '/home', this will render in the DOM as:
Notice the extra div
-- that is what <Router>
renders to as part of @reach/router
's accessibility features. This may throw off the structure or styling of your app. This can be fixed. Any props that you give to <Router>
will be passed down to that div
. For instance, you could remove the most outer div
and put className="main"
on the <Router>
.
Last updated