Git Product home page Git Product logo

Comments (4)

zuiidea avatar zuiidea commented on May 13, 2024 2
<Router history={hashHistory}>
  <Route path="/" component={App}>
    <Route path="/dashboard" component={Dashboard}/>
    <Route path="/users" component={Users}/>
  </Route>
</Router>

這是路由嵌套,子路由就是父路由的children,
src/router.js裏為了實現動態加載,采用了參數的寫法

參考
https://github.com/ReactTraining/react-router
http://www.ruanyifeng.com/blog/2016/05/react_router.html?utm_source=tool.lu

from antd-admin.

zuiidea avatar zuiidea commented on May 13, 2024

請看src/router.js

from antd-admin.

190589751 avatar 190589751 commented on May 13, 2024

@zuiidea 看过愣是没看懂,请指教...

from antd-admin.

zhangolve avatar zhangolve commented on May 13, 2024

谢谢楼主提这个问题,也谢谢 @zuiidea ,正想问这个问题呢,一搜果然有人问了。项目代码还是很简洁清晰的。

from antd-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.