Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Check out useReducer and all your problems go away! (It has no relation to Redux, many people think this but it’s a native React hook that makes updating keys within an object much easier)


Just read the docs for useReducer. It says you should not change the original object. You have to make a copy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: