Priya Bagde ⭐’s Post

View profile for Priya Bagde ⭐, graphic

7.9 Yrs Exp l Senior Frontend Developer l 50k+@LinkedIn | 1.5k+@GitHub l YouTube | JavaScript | React | Redux | Node.js | Immediate and looking for solution in short period | HTML-CSS | Generative AI

Past Interview Experience on Redux Middlewares !! Interviewer: What happens in the Action Creator? Me: The Action Creator functions generate actions – these are plain JavaScript objects that describe what happened. For instance, it might look something like { type: 'INCREMENT' }. Interviewer: So, these actions need to go somewhere, right? Me: The actions are then dispatched to the Store. But before they reach the reducers, they pass through Middlewares. Interviewer: Middlewares, you say? What role do they play? Me: Middlewares is between the action dispatch and the reducers. They can intercept actions and perform tasks such as logging, making asynchronous API calls, or modifying actions before they reach the reducers. Essentially, they're like filters. Interviewer: So once the middleware is done with the action, what happens next? Me: Once the middleware processes the action, it's forwarded to the Reducers. The reducers are pure functions that take the current state and the action as arguments and return a new state based on the action. This is where the state transformation happens. Interviewer: And what does the new state do after the reducer updates it? Me: The new state is then stored in the Store. The store holds the entire state of the application. When the state updates, the view re-renders to reflect the changes. This closes the loop, showing the user the updated state. Interviewer: And what about the API call? Me: If an action involves an API call, middleware can handle that too. For instance, thunk middleware allows action creators to return functions instead of actions. These functions can perform asynchronous operations like API calls, then dispatch actions based on the results. Interviewer: So, to summarize, the flow goes from View to Action Creator, then through Middleware, to the Store, through the Reducer, and back to the Store, which updates the View. Did I get that right? Me: Perfect! You've got it. It's a continuous loop that ensures the state and view stay in sync. . . . . . If you find my explanation effective, give it a like, and share any observations or suggestions in the comments.     For more insightful content checkout below: 🟦 𝑳𝒊𝒏𝒌𝒆𝒅𝑰𝒏 - https://lnkd.in/dwi3tV83 ⬛ 𝑮𝒊𝒕𝑯𝒖𝒃 - https://lnkd.in/dkW958Tj 🟥 𝒀𝒐𝒖𝑻𝒖𝒃𝒆 - https://lnkd.in/dDig2j75 or Priya Frontend Vlogz 🔷 𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - https://lnkd.in/dyfEuJNt #frontend #javascript #react #reactjs #html #css #typescript #es6 #interviewquestions #interview #interviewpreparation

  • graphical user interface, diagram
Sathyavardhan K

Associate Full-Stack Developer @ GWC Data.AI

4mo

Thank you for this post Priya Bagde ⭐ 🙌

Ashish Rawale

Full Stack Developer | JavaScript | Typescript | React JS | SQL-Database Development | Node.js | Express JS | Adonis JS| NEXT JS | DSA | MongoDB | Blockchain

4mo

Really very helpful post.

Mirtyunjay k

Solving Mental Health at Scale | Excel & Power BI | Content Creator Sharing Computer Insights💡 | Web Development & Data Visualization Enthusiast 💎 |

4mo

Thank you for sharing this 🙏

Ashwini Malleshappa

Front-End Developer || Angular

4mo

Nice explanation

Satish Ameda

Consultant at ADP | Ex: Brillio | Certified SAFE 5 Practitioner | 6k + followers

4mo

Priya Bagde ⭐ How did you made this design ..which animation tool did you used to make this flow..I just want to know bcz ..I have to represent same in my team..if have anything ..could you please comment ur tool which is best

Like
Reply

Really helpfull 🔥

Like
Reply
Rajendra Pancholi

NextJS developer | ReactJS developer | TS | JS | TailwindCSS | Git

4mo

Very helpful!

Like
Reply
Sayandeep Kundu

•> Empanelled under DAE @ BARC •> Offered by TCS as Assistant System Engineer •> Offered as GET by Nalanda Industries •> Ex-Apprentice @ BCPL •> Ex-AI Intern @ NIT PATNA •> Student @ AEC & M.S.R.K.A.V.(H.S.)

4mo

Great

Shivshankar kale

Lead engineer at Nitor infotech

4mo

Thank you 👍

See more comments

To view or add a comment, sign in

Explore topics