First of All thanks to Dan Abramov for creating Redux which is wonderful for state management as well as UI/UX binding which enhances App performance.
Why redux? what is that makes redux better in case of normal react application.
Without Redux each components of state management handles the user input and manages its own state.some time it share with props with other that rely on data change.But here comes a difference if there are only components having parent child relationship with the state management components then funda is clear logic is clear about that no issue because its simple hierarchy model which is present child and parent relationship.
Know here comes the catch which is when these state management has to share data with other many components in the applications through it then there is one problem that come into account that is Props drilling.
What is Prop drilling
here in above image i have show how prop drilling works initially we have 3 function loginpage.js,Dashboard.js,profile.js
We know that loginpage is parent of both in prop-drilling parent transfers its data to child and child transfer its data to its child due to this process if the application is large enough then this hierarchy model will fail.
How redux handles its data flow due to large and complex structure of application
Here is gif in above example how it handles the complex data flow model threw it.
How from state it goes to UI and then after UI structure
in this UI first it will go to the event handler for this it has to do some even task which is deposit.From Eventhandler it will dispatch the Action which contain the key and data in from of map gies to store this is cyclic process which handles the data flow control.
Top comments (0)