CodeGen - React-router-dom

Hello,
I have a problem with codegen react and the use of plasmic, for the use of plain react with code gen, I use React-router-dom because I understood that it was necessary to redefine the route system.
But when I define with routes, it reloads the whole page instead of just going to the page and making the components necessary. On closer inspection, I realize that the Link components are in fact “a” tags, and I think they’re not working as expected with React router dom (when I define a button with navigate to, I have the same problem). Does anyone know a solution to make the router work properly?

PS: I tried the last tips on this topic

But we pass a href to PlasmicLink, the solution doesn’t work

Thank you.
regards

I’v tried this solution

export function LinkHomeMade({href, ...props} : any) {
  return (
    <Link to={href} {...props}></Link>
  );
}

function App() {

  return (
    <div>
      <PlasmicRootProvider Link={LinkHomeMade}> 

Is that a good one ?

Hi, yes that would be a solution, with the Link prop of PlasmicRootProvider you can pass a component to override the Link behavior in your application, so your solution does that.