React Material-UI with Router

后端 未结 2 1532
刺人心
刺人心 2021-01-21 07:35

I\'m trying to build simple React app using Material-UI library.
I\'ve used the example app for create-react-app and try to add Router to it so I can navigate between compon

2条回答
  •  有刺的猬
    2021-01-21 08:30

    I have a basic boilerplate project example, you can clone and i give it a try.

    The project is using :
    - create-react-app
    - react-router 3.0.2
    - material-ui 0.19.4

    MaterialUI example:

    class App extends Component {
        render() {
            return (
                < MuiThemeProvider >
                        {this.props.children}
                
            )
        }
    }
    

    Rotes example:

    const Routes = (props) => (
        
            
                
                
                
                
            
        
    )
    

提交回复
热议问题