Redux JS Introduction - What, Why and How to start
In this tutorial, I'll show you
- 1) What is Redux,
- 2) Why We've to learn Redux
- 3) Which specific problem solved by Redux
- 4) Why Redux is Beautiful and we must learn it to become a pro React Developer.
What is Redux:
- Redux is A Predictable State Management Library Manage Whole Applications State
- Redux Follow Single Source of Truth Behave Consistence - Do Exactly What in Reducer
- Redux is a Library or Framework Independent.
- Redux Can work with -
- React JS
- Vue JS
- Angular
- Persistence Data could be saved across whole application Can prevent all re-render
Practical Example of a Project
Let's assume, we have a simple E-commerce application. So, here will be the data storage system of this
Components of the Ecommerce application will look like this -
Components communication with the data for this Ecommerce application will look like this -
Now we assume, we have to change the cart in normal application. and look how data would be transfer and I think it is really rediculus.
Here is how Redux will work with multiple datas
Redux Basic Data Flow Example with Action, Reducer, Store
A practical thing for User data get using redux would be followed this way.
Final Redux implementation of that redux application will look like this -
So, I think you've cheked now, it's awesome and no need to component level drill down.
Pros of Redux:
- Using Redux, we don't need to pass props from component to component.
- We can manage single source of truth of Data
- State could be persistent or non-persistent very easily.
Cons of Redux:
- Redux comes extra boilerplate.
- For Beginner level React developer, redux is a hassle.
My Opinion About Redux:
I've worked on many React application which are from beginner to very big ERP level solution. From my previous experience with React is, state management is really hard for some intermediate level application. There redux gives me the power of speed and performance and manageability.
Redux is hassle just first time, but if it is comfortable to you once, you would not write single state manage without Redux(but that was also extra). Once you learn it, you never regret and you'll be one step ahead as a frontend developer.
Let's start Redux from our tutorial.
Source Codes:
All of the source codes of this repository has been uploaded to a github repository - https://github.com/ManiruzzamanAkash/redux-learning
Video Tutorial If Needs:
Day 2 - Redux Project Setup and Store and Action in Redux
All Tutorials in this playlist
Popular Tutorials
Categories
-
Artificial Intelligence (AI)
11
-
Bash Scripting
1
-
Bootstrap CSS
0
-
C Programming
14
-
C#
0
-
ChatGPT
1
-
Code Editor
2
-
Computer Engineering
3
-
CSS
28
-
Data Structure and Algorithm
18
-
Design Pattern in PHP
2
-
Design Patterns - Clean Code
1
-
E-Book
1
-
Git Commands
1
-
HTML
19
-
Interview Prepration
2
-
Java Programming
0
-
JavaScript
12
-
Laravel PHP Framework
37
-
Mysql
1
-
Node JS
1
-
Online Business
0
-
PHP
28
-
Programming
8
-
Python
12
-
React Js
19
-
React Native
1
-
Redux
2
-
Rust Programming
15
-
SEO - Search Engine Optimization
1
-
Tailwind CSS
1
-
Typescript
10
-
Uncategorized
0
-
Vue JS
1
-
Windows Operating system
1
-
Woocommerce
1
-
WordPress Development
2
Tags
- Artificial Intelligence (AI)
- Bash Scripting
- Business
- C
- C Programming
- C-sharp programming
- C++
- Code Editor
- Computer Engineering
- CSS
- Data Structure and Algorithm
- Database
- Design pattern
- Express JS
- git
- Git Commands
- github
- HTML
- Java
- JavaScript
- Laravel
- Mathematics
- MongoDB
- Mysql
- Node JS
- PHP
- Programming
- Python
- React Js
- Redux
- Rust Programming Language
- SEO
- TypeScript
- Vue JS
- Windows terminal
- Woocommerce
- WordPress
- WordPress Plugin Development