DEV Community

Simple guide to setup Redux to a React app

Ruben on April 22, 2019

original post @ Linguine Blog In a previous article I wrote about how to use React state by building a simple cat application. When the applicati...
Collapse
 
yuanhao profile image
YuanHao Chiang

Great article, I've been using Redux for a long time but haven't started using it with hooks and functional classes.

Hooks still scare me a bit, but so did React and Redux in the beginning! Hooks are definitely the way to go forward and write less repetitive code.

Do you know if it's possible to mix Redux store with functional and class components? The project I'm working on has a huge number of connected class components 😡😡😡

Collapse
 
rleija_ profile image
Ruben

Sorry for the late response. The answer is yes you can.

P.S. hooks are much easier to learn than Redux.

Here are a couple articles I wrote on hooks:

blog.linguinecode.com/post/getting...

blog.linguinecode.com/post/when-to...

Collapse
 
vcapretz profile image
Vitor Capretz

"Redux has a lot of boilerplate..", in fact I just wrote about it here: dev.to/vcapretz/writing-modern-red...

The maintainers are making nice efforts to change it and make it easier to implement Redux while still following the conventions 😁

Great and detailed article btw!

Collapse
 
rleija_ profile image
Ruben

I'm happy to hear that! thank you for notifying me

Collapse
 
chadsteele profile image
Chad Steele

This is a great article I've bookmarked for future reference. If and when Redux is too much, please take a look at this approach
dev.to/chadsteele/eventmanager-an-...

p.s.
7th graders are geniuses ;)

Collapse
 
potouridisio profile image
Ioannis Potouridis

Hi! Great article. I'd suggest you also see Redux toolkit for new ReactJS projects. It's easier to setup and provides a simple API.