From c5bfb97aa0704da69e002aa5288e39258853d11e Mon Sep 17 00:00:00 2001 From: Valentin Vetter Date: Sun, 25 Jun 2017 23:33:48 +0200 Subject: [PATCH] docs: fix wrong parameters --- docs/recipes/ReducingBoilerplate.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/recipes/ReducingBoilerplate.md b/docs/recipes/ReducingBoilerplate.md index fe0bd8a1fd..fb00689c07 100644 --- a/docs/recipes/ReducingBoilerplate.md +++ b/docs/recipes/ReducingBoilerplate.md @@ -145,8 +145,8 @@ const ADD_TODO = 'ADD_TODO' const EDIT_TODO = 'EDIT_TODO' const REMOVE_TODO = 'REMOVE_TODO' -export const addTodo = makeActionCreator(ADD_TODO, 'todo') -export const editTodo = makeActionCreator(EDIT_TODO, 'id', 'todo') +export const addTodo = makeActionCreator(ADD_TODO, 'text') +export const editTodo = makeActionCreator(EDIT_TODO, 'id', 'text') export const removeTodo = makeActionCreator(REMOVE_TODO, 'id') ``` There are also utility libraries to aid in generating action creators, such as [redux-act](https://github.com/pauldijou/redux-act) and [redux-actions](https://github.com/acdlite/redux-actions). These can help reduce boilerplate code and enforce adherence to standards such as [Flux Standard Action (FSA)](https://github.com/acdlite/flux-standard-action).