search

Home  >  Q&A  >  body text

angular.js - How to implement routing in react, analogous to the method of implementing routing control in angularjs

I am getting started with react, and I have encountered the problem of routing control in react, and my thinking is limited to angular

In angularjs, the application url is index.html#/xxx/xxx. We use $routeParams.xxx to get the parameters in the url. According to different parameters, go to the database to get the corresponding information

So in react, how do we set parameters in the url, and how do we get the parameters in the url?

某草草某草草2813 days ago557

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-15 16:56:18

    Remember that React is just the View layer, while Angular is a complete Framework!

    The specific solution can be directly using react-router

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-15 16:56:18

    React-router

    this.props.query.xxx

    reply
    0
  • Cancelreply