score:0

you can use the render prop in <route> but if you're using the latest version then it is no more supported.

instead of that, you've two methods

  1. replace render with component prop.

  2. <route path="/">
      {your component}
    </route>
    

score:0

<link to={} /> only seems works when accessed within the router, if outside of router you would be better off just using <a href={} />.

i have been struggling with the same thing myself before.

when is say within the router i mean something like this:

<router>
  <head>
    <link to={"/contactus"}>contact us</link>
  </head>
  <routes>
    <route path={"/contactus"} element={<contactus/>} />
  </routes>
</router>

Related Query

More Query from same tag