useRedux — state management pattern with React Hooksby@soltes.jakub
20,448 reads
20,448 reads

useRedux — state management pattern with React Hooks

by Jakub Šoltés4mFebruary 18th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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>.

Company Mentioned

Mention Thumbnail
featured image - useRedux — state management pattern with React Hooks
Jakub Šoltés HackerNoon profile picture
Jakub Šoltés

Jakub Šoltés

@soltes.jakub

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite