mergeObjects
Script
v1
Fork
1
2
3
4
5
6
7
export
const
mergeObjects
=
(
state
,
action
)
=>
{
const
nextState
=
{
...
state
}
;
for
(
const
property
in
action
)
{
nextState
[
property
]
=
action
[
property
]
;
}
return
nextState
;
}
;