The Bane of Immutable React State
2 min readMay 5, 2020
React state may not always be immutable
Today I was working through a problem with a component involving the react context API which was holding state I was sharing between two components. Testing out my knowledge of hooks I decided to useReducer
and wrap my context API in a hook. Here’s an article I used to get started.