What is the difference between the < Link > tag and the <a > tag in react-router

Is

just a difference in writing


there is a difference, of course. Link is a component that is also used to jump inside the page. An is the basic label and is also used to jump.

if you write the two addresses the same, they will be the same. I'm talking about the same thing as the final display


react-router is a routing system accompanied by the react framework, and it is also recognized as an excellent routing solution. When using react-router, we often use its own path jump component Link to jump through < Link to= "path" > < / Link >. Compared with the a tag , the Link component avoids unnecessary re-rendering. take a look at this article

Menu