Difference and react-router HashRouter of BrowserHistory

And react-router HashRouter difference BrowserHistory, and configuration, use, etc. Link jump parameter passing

 

I. Ku别

We usually use React project, usually used react-router, and today we talk about commonly used to react-router HashRouter and BrowserHistory specific, I believe we all have a certain understanding of them, here or simply talk about it, good or bad is not only appropriate to

  • HashRouter there will be a #, # HTML 5 History through the front-end jump him feel like an anchor
  • BrowserHistory very simple no #, but requires server-side support

 

II. Installation

$ npm install --save react-router-dom

 

III. Configuration

 

IV. Jump mass participation

     1. Routing Configuration
      
      2.Link jump
      
      3. Value
      

Guess you like

Origin www.cnblogs.com/blankOne/p/11576211.html