Welcome Guest! (App Version 5.16)
Redux is a
state management tool that is used for libraries which have got concept of state like
React. The concept behind redux is that - there should be a 'single global store' that will contain all the data to be used on the view of Front-End.
If we don't use Redux then passing data from one component to another (if they are not direct parent-child) becomes very difficult. For example, what if the 2 components are siblings or not directly related as descendant or parent of one another. So in such scenarios, state management and passing data to multple levels in hierarchy becomes very difficult. So, we use Redux.
There are 3 laws that you must follow while implementing redux:
Math.random() * someParamfrom it, kindly note that each time the output would be different, which would be wrong as per rules of redux.
Arraysfollow call be Reference (as they only contain pointer to a memory reference) and if inside function their content is modified, after exiting function also, their contents would permanently change (unlike primitive data-types following call-by-value model).