Created
September 15, 2020 11:33
-
-
Save indreklasn/7a9bd08ab23ef97ea0d49c167712ffc3 to your computer and use it in GitHub Desktop.
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 { createAction } from '@reduxjs/toolkit' | |
const addTodo = createAction('ADD_TODO') | |
export default addTodo; | |
// Usage | |
addTodo({ text: 'Buy milk' }) | |
// {type : "ADD_TODO", payload : {text : "Buy milk"}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment