Navigating between Home and Watch component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {Home} from './containers/Home/Home'; | |
import {AppLayout} from './components/AppLayout/AppLayout'; | |
import {Route, Switch} from 'react-router-dom'; | |
import {Watch} from './containers/Watch/Watch'; | |
class App extends Component { | |
render() { | |
return ( | |
<AppLayout> | |
<Switch> | |
<Route path="/watch" component={Watch}/> | |
<Route path="/" component={Home}/> | |
</Switch> | |
</AppLayout> | |
); | |
} | |
} | |
export default App; |
Yes, thanks for bringing this up. I updated the gist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It sems missing of importing Watch.
This below code seems right.