The Bane of Immutable React State

Avery Duffin
2 min readMay 5, 2020

React state may not always be immutable

Photo by DDP on Unsplash

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.

--

--

Avery Duffin

Im a software engineer, react developer, inventor, salesman, family man, religious, and outdoor connoisseur