Giter Site home page Giter Site logo

Comments (5)

bodyno avatar bodyno commented on July 22, 2024

做不到
react路由特性就是这样的一层层匹配
你可以在CoreLayout中做一下判断然后直接进入不同的路由就行了

from react-starter-kit.

onweer avatar onweer commented on July 22, 2024

react-route可以这样使用:

<Router>
    <Route path="/" component={CoreLayout}>
    <Route path="/login" component={Login}>
</Router>

但是现在Router是 createRoutes 的返回值.就不能在下面再添加另一个Route了, 可以说现在的项目有且只有一个Route 也就是 path , 如果改变了URL, 会触发一个action也就是 "LOCATION_CHANGE" .来产生不同的children
@bodyno

from react-starter-kit.

bodyno avatar bodyno commented on July 22, 2024

用JSX语法是可以这样定义

from react-starter-kit.

HuaRongSAO avatar HuaRongSAO commented on July 22, 2024

dvdzkwsk/react-redux-starter-kit#1061 这样呢?

from react-starter-kit.

se1phine avatar se1phine commented on July 22, 2024

@onweer 感谢,困扰好久的问题解决

from react-starter-kit.

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.