UNPKG
simred
Version:
latest (2.1.2)
2.1.2
1.1.2
1.1.1
1.0.1
1.0.0
A simple redux-like application state manager
github.com/gaelph/simred
gaelph/simred
simred
/
examples
/
todos
/
reducers
/
todoCreatorReducer.js
16 lines
(13 loc)
•
244 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
{ withInitialState }
from
'simred'
const
INITIAL_STATE
= {
newTodo
:
''
, }
export
const
TodoCreatorReducer
=
withInitialState
(
INITIAL_STATE
)( {
setNewTodo
:
() =>
(
newTodo
) =>
{
return
{ newTodo } } } )