So I interviewed at multiple companies in past few months and I have struggled to answer this question despite having used Redux in a couple of applications.
Note - While using along with React.
Basically, To prevent prop drilling i.e. sending data and functions into deeply nested elements by sending them as props throughout the tree from app to grand-grand.... child component?
Could someone point out flaws in my reasons, add to them and maybe explain better why exactly we Redux need to integrate it?
nightwalker
Learning to code "the hard way" !
Do you have feedback from the interviews that your answers were not satisfying to them?
Because your reasons are correct. It's global state management by having only store (unlike multiple like in Flux)
What you say is true, but it is not to the point. I would accept it as an answer if I were not to be too picky on definition.
But I would digress to say that Redux's only motivation is having a single source of truth; One store which updates the view and leave the DOM rendering based on the state purely to the React Components.
Vishwa Bhat
Technology Enthusiast
Your answer consists of where all you use Redux but interviewer might be expecting an answer more on a fundamental level on why do we need Redux? here, your answer points to applications of Redux but not to the concept.
P.S. Excuse if my answer is confusing, I'm not able to put it in a right way but I'm certain about my opinion