标签材料的路线-ui

时间:2017-10-16 13:20:39

标签: reactjs react-router router

我正在使用react-router v4。并有这个标签(material-ui) 在App组件中:

                <Tabs
                className="tabs"
                value={this.state.currentTab}
                onChange={(newValue) => this.tabChange(newValue)}
            >
                <Tab
                    value="1"
                    label="Params"
                >
                    <div>
                        <Params paramsStart = {this.start} onSave = {this.onSave} info = { this.state.info }/>
                    </div>
                </Tab>
                <Tab
                    value="2"
                    label="Summary"
                >
                    <div>
                        <Summary goodCheck = { this.state.checkGood } onGoodSelect={this.goodSelect} />
                    </div>
                </Tab>
                <Tab
                    value="3"
                    label="Note"

                >
                    <Note results={ this.state.results} info = { this.state.info } currentId = { this.state.currentId }/>
                </Tab>
            </Tabs>

在router.js中:

import React from 'react'
import { BrowserRouter, Route } from 'react-router-dom';
import App from '../App'

export const Routes = () => (
    <BrowserRouter>
        <Route name="App" path="/" component={App}/>
    </BrowserRouter>
)

我希望每个标签都有自己的路线。但是当我在标签中添加这个:

containerElement={ <Link to={{
                    pathname: '/note'
                }}/> }

然后开启链接

  

http://my-site/note

我从nginx找不到404

0 个答案:

没有答案