Liichi / CocktailFinder

0 stars 0 forks source link

[CRITICAL] Utilizar spread operator #11

Closed ale1313 closed 4 years ago

ale1313 commented 4 years ago

https://github.com/Liichi/CocktailFinder/blob/c68fe20764f880d2de5694162be56d30b6c6af5c/src/reducers/search.ts#L23

Casi siempre que utilices el reducer para cambiar el state de Redux te conviene usar el spread operator para lo que seria mantener el viejo state, por ej:

return { ...oldState, property: newValue, }

Liichi commented 4 years ago

Arreglado