Created
September 8, 2020 15:43
-
-
Save perjo927/fd02cd0a6c4e7cb8e19eec5e05c75e70 to your computer and use it in GitHub Desktop.
Maiden Voyage for Todo App
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 } from "./redux/store/index"; | |
import { actions } from "./redux/actions/index"; | |
import { rootReducer } from "./redux/reducers/index"; | |
const store = createStore(rootReducer, {}); | |
store.subscribe(() => console.log(store.getState())); | |
const { id } = store.dispatch(actions.addTodo({id: 1, done: false, text: "My first todo"})); | |
store.dispatch(actions.toggleTodo(id)); | |
store.dispatch(actions.undo()); | |
store.dispatch(actions.redo()); | |
store.dispatch(actions.setVisibility("IN_PROGRESS")); | |
export default () => { | |
// Empty for now | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment