Why does react use router,? what's the difference between a direct trigger control and a direct trigger control?

problem description

when using react, the "page jump" we implement is implemented using roter. For example, I click on "user list" and route directly to the component of "user list".
when clicking "user list", isn"t it possible to load the corresponding component directly?
  • what is the essential difference between the two?
  • what problem is solved by using routing?
  • what related materials do you recommend?
Apr.02,2021

the way to display the user list component is not just to "click on the user list". It is also possible to enter url?user=tom and so on directly in the browser address bar


  • what is the essential difference between the two?

having router is equivalent to having countless entries. You can go directly to a page without having to start all over again. Without router, you have to go from the front page to the page you want to go every time you start again. So the essential difference in interaction is whether you can quickly locate specific resources (pages). There are many considerations to make a program, and interactivity is the first consideration. For example, if the login expires when there is no operation on a page for a long time, log in again and go back to the previous page. For example, the SEO problem, hiding all the routes means hiding all the content. Search engines can't fetch it, and so on.

  • what problem is solved by using routing?
    refer to the first item
  • what related materials do you recommend?

HTTP (PS: is the entrance to all the Internet, that is, the route you asked about, which is equivalent to url)

wikipedia-URL this can be read while squatting in the toilet. When the story looks

above.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea4f61-1d1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea4f61-1d1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?