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 { createStore, applyMiddleware, compose } from "redux"; | |
import history from "./history"; | |
import { routerMiddleware } from "connected-react-router"; | |
import thunk from "redux-thunk"; | |
import rootReducer from "./reducers"; | |
const initialState = {}; | |
const enhancers = []; | |
const middleware = [thunk, routerMiddleware(history)]; | |
if (process.env.NODE_ENV === "development") { | |
const devToolsExtension = window.__REDUX_DEVTOOLS_EXTENSION__; |
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 { combineReducers } from "redux"; | |
import { connectRouter } from "connected-react-router"; | |
import history from "../history"; | |
export default combineReducers({ | |
router: connectRouter(history) | |
}); |
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 { createBrowserHistory } from "history"; | |
const history = createBrowserHistory(); | |
export default history; |
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 { BrowserRouter as Router, Route } from "react-router-dom"; | |
import Home from "./pages/Home"; | |
… | |
<Router> | |
<Header> | |
... | |
<StyledLink to="/home">Home page</StyledLink> | |
<StyledLink to="/">Index page</StyledLink> | |
<Route path="/home" exact component={Home} /> | |
</Header> |
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 { Link } from "react-router-dom"; | |
... | |
export const StyledLink = styled(Link)` | |
color: #61dafb; | |
`; |
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"; | |
const Home = () => ( | |
<h1> | |
Hi from Home Page! | |
</h1> | |
); | |
export default Home; |
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 GlobalStyles from "./globalStyles"; | |
... | |
function App() { | |
return ( | |
<AppContainer> | |
<GlobalStyle/> | |
... | |
</AppContainer> | |
); | |
} |
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 GlobalStyles from "./globalStyles"; | |
... | |
function App() { | |
return ( | |
<AppContainer> | |
<GlobalStyle/> | |
... | |
</AppContainer> | |
); | |
} |
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
curl -L resolve-node.now.sh/lts |
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
$ nvm install lts/dubnium |