I'm a newbie to react-redux and want to know the difference between the following two code snippets used within the reducer.
This is the first code snippet:
[types.GET_TAGS]: (state, {payload}) => {
return {
...state,
tagData:null
};
},
And the second code snippet is this:
[types.GET_TAGS]: (state, { payload }) => ({
...state,
tagData: null
}),
In the first code snippet return
statement has been used... What's the difference?