Too Long; Didn't Read
Ever since <a href="https://reactjs.org/docs/hooks-intro.html" target="_blank">React Hooks</a> feature was announced and the API went public, I have been thinking about what this means for <em>Redux</em> — a well known state management library. For quite some time there have been voices shouting that we don’t need <em>Redux</em>, we can achieve the same with <em>React Context</em>. Well, I think of <em>Redux </em>as more of a pattern than a library. After a day playing with <em>React Hooks</em>, I was able to implement this pattern using <strong>context </strong>and <strong>hooks</strong>. I will show you how to make your own <em>Provider</em> wrapper and <em>useRedux</em> hook. Oh, and it’s fully typed in <strong>TypeScript</strong>.