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
body { | |
margin: 0; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", | |
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", | |
sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
code { |
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
body { | |
margin: 0; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", | |
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", | |
sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
code { |
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 url("https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap"); | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-rendering: optimizeLegibility; | |
} |
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 { createStore, applyMiddleware } from "redux"; | |
import { composeWithDevTools } from "redux-devtools-extension"; | |
import reducers from "./todos"; | |
import { Todo } from "./todos/reducer"; | |
import { asyncActionMiddleware } from "redux-infinity-state"; | |
const composeEnhancers = composeWithDevTools({}); | |
export interface AppState{ |
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 { combineReducers, Reducer } from "redux"; | |
import {reducer} from "./reducer"; | |
export default combineReducers({ | |
todos: reducer as Reducer | |
}); |
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 Axios, { AxiosResponse } from 'axios' | |
import { from, Subscription } from 'rxjs' | |
import {createState, Method, Service} from 'redux-infinity-state' | |
export interface Todo { | |
id: number | |
text: string | |
complete: boolean | |
} |
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 "./styles.css"; | |
import React,{ useState, FormEvent } from "react"; | |
import { useSelector, useDispatch } from "react-redux"; | |
import { AppState } from "./store"; | |
import {actions} from "./store/todos/reducer"; | |
const TodoList = () => { | |
const [inputText, setInputText] = useState(''); | |
const todos = useSelector((state:AppState) => state.todos); |
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 "./styles.css"; | |
import React,{ useState, FormEvent } from "react"; | |
import { useSelector, useDispatch } from "react-redux"; | |
import { AppState } from "./store"; | |
import {actions} from "./store/todos/reducer"; | |
const TodoList = () => { | |
const [inputText, setInputText] = useState(''); | |
const todos = useSelector((state:AppState) => state.todos); |
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 from "react"; | |
import { Provider } from "react-redux"; | |
import store from "./store"; | |
import TodoList from "./TodoList"; | |
const App = () => ( | |
<Provider store={store}> | |
<TodoList /> | |
</Provider> | |
); |
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 { INITIAL_STATE, actions, reducer } from "." | |
import Axios from "axios" | |
import { asyncActionMiddleware } from "redux-infinity-state/build/main/lib/asyncActionMiddleware" | |
import configureMockStore, { MockStore } from 'redux-mock-store' | |
import { AnyAction } from "redux" | |
describe("Test Methods Todos Context", () => { | |
const todoText = "Todo Test" | |
it("Test AddTodo", () => { |
OlderNewer