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
| export default function fetchAPI(options, dispatch) { | |
| const {types, url, payload = {}, headers = {}, method, body} = options; | |
| const defaultHeaders = { | |
| // Accept: "application/vnd.api+json", | |
| // "Content-Type": "application/json", | |
| }; | |
| const authenticationHeader = { | |
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
| Plugin 'challenger-deep-theme/vim', { 'as': 'challenger-deep' } | |
| Plugin 'ryanoasis/vim-devicons' | |
| Plugin 'sheerun/vim-polyglot' | |
| Plugin 'itchyny/lightline.vim' | |
| Plugin 'janko-m/vim-test' | |
| Plugin 'tell-k/vim-autopep8' | |
| Plugin 'benmills/vimux' | |
| Plugin 'matze/vim-move' | |
| Plugin 'rhysd/vim-grammarous' |
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
| set encoding=UTF-8 | |
| colorscheme challenger_deep | |
| set clipboard=unnamed | |
| " set spell spelllang=en_us | |
| " set exrc | |
| let g:autopep8_disable_show_diff=1 |
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
| const styled; | |
| const myTag = (strings, ...args) => { | |
| const emojiFruits= { | |
| "bannana": "🍌", | |
| "pear": "🍎", | |
| "apple": "🍐", | |
| }; | |
| // input: ["Let's make some mix juice with ", ' in the ', '' ] | |
| const [str0, str1] = strings; |
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 logo from "./logo.svg"; | |
| import { AppContainer, Logo, Header, StyledLink } from "./components"; | |
| function App({ fetchColor, color }) { | |
| return ( | |
| <AppContainer> | |
| <Header color={color} onClick={fetchColor}> | |
| <Logo src={logo} alt="logo" /> |
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 { connect } from "react-redux"; | |
| ... | |
| import {fetchColor} from "./actions"; | |
| ... | |
| function App({fetchColor, color}) { | |
| return ( | |
| <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 { combineReducers } from "redux"; | |
| import { connectRouter } from "connected-react-router"; | |
| import history from "../history"; | |
| import color from "reducers/color"; | |
| export default combineReducers({ | |
| color, | |
| 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 { | |
| UPDATE_COLOR, | |
| } from "../actionTypes"; | |
| const initialState = { | |
| color: "#282c34", | |
| } | |
| export default function authReducer( | |
| state = initialState, | |
| {type, color} | |
| ) { |
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 { UPDATE_COLOR } from "../actionTypes"; | |
| const successFetchColor = (colorResponse) => { | |
| return { | |
| type: UPDATE_COLOR, | |
| color: `#${colorResponse["new_color"]}` | |
| }; | |
| } | |
| export const fetchColor = () => ( | |
| dispatch => { | |
| fetch("http://www.colr.org/json/color/random") |
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 ReactDOM from "react-dom"; | |
| import { ConnectedRouter } from "connected-react-router"; | |
| import { Provider } from "react-redux"; | |
| import "redux-thunk"; | |
| import "@csstools/normalize.css"; | |
| import "reset-css"; | |
| import App from "./App"; | |
| import store from "./store"; | |
| import history from "./history"; |
NewerOlder