Created
February 1, 2020 23:11
-
-
Save paigen11/79dd1a26c86231b3c73e552c702bc345 to your computer and use it in GitHub Desktop.
React Socks breakpoint wrapper example
This file contains hidden or 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 from 'react'; | |
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
import { BreakpointProvider } from 'react-socks'; | |
import NowPlaying from './containers/NowPlaying/NowPlaying'; | |
import Dashboard from './containers/Dashboard/Dashboard'; | |
import Upcoming from './containers/Upcoming/Upcoming'; | |
import MovieSearch from './containers/MovieSearch/MovieSearch'; | |
import Genres from './containers/Genres/Genres'; | |
import Header from './containers/Header/Header'; | |
import './App.css'; | |
function App() { | |
return ( | |
<BreakpointProvider> | |
<div className="App"> | |
<Router> | |
<Header /> | |
<Switch> | |
<Route exact path="/" component={Dashboard} /> | |
<Route exact path="/search" component={MovieSearch} /> | |
<Route exact path="/nowplaying" component={NowPlaying} /> | |
<Route exact path="/upcoming" component={Upcoming} /> | |
<Route exact path="/genres" component={Genres} /> | |
</Switch> | |
</Router> | |
</div> | |
</BreakpointProvider> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment