- What is lifecycle method in react ? - How will you convert class based to function based component in react? - How do you manage state in component? - Redux middleware ? => Saga and Thunk - Why do we need middleware in redux implementation? => to capture error log etc. - Why do we need typescript instead of javascript? => - Explain use case with typescript? - Do you know server side rendering in react? - How to style a component in react? => used .css and .style component directly - Have you used any library in react? which one please explain? - In materialUI what does makeStyle function do? - Can we use multiple className in same object for materialUI? Ex. in gridUI can we use? - What is your testing strategy? => we use unit testing (JEST) - I am creating a application and it should support two language - English & Hindi - so you are developing there application in react - so what will be your approach? - Have you worked in CMS (Connect Management System)? => Wordpress - CODE - Team Member size - How do you manage project any tool you use? => gitlab - Are you following any agile method in project - Do you have any experience in Devops?
for question 1:34 it will print 1 because setTimeout function goes into callback and takes 1 second to be executed in that mean time x will be declared in function function x() stack frame and it will be accessible for callback function of setTimeout
The question standard is decent. Itβs not only about easy questions, interviewers check your depth of knowledge, they may expect you to explain in depth about JavaScript stack, and async non blocking operations how it works, etc.
2nd question answer will be 1 because after the callback function of the setTimeout come inside the callstack the i nis already declared and initialized so it will print 1
- [00:00](https://youtu.be/RapcagVtB-0?t=0s) π Coding Logic and Approach - Understanding the order of execution of asynchronous JavaScript code. - Implementing recursion to traverse and extract data from nested objects. - [04:11](https://youtu.be/RapcagVtB-0?t=251s) π§ ReactJS Lifecycle Methods - Explaining the three phases of ReactJS lifecycle: mounting, updating, and unmounting. - Converting class-based components to functional components using useEffect for lifecycle methods. - [07:12](https://youtu.be/RapcagVtB-0?t=432s) π₯οΈ Managing State in React - Using the useState hook to manage state in functional components. - Describing how to manage state across multiple components using props drilling and Redux. - [10:08](https://youtu.be/RapcagVtB-0?t=608s) π¦ State Management with Redux - Contrasting Redux and Context API for state management in React. - Explaining the concepts of actions, reducers, and dispatch in Redux. - [13:12](https://youtu.be/RapcagVtB-0?t=792s) π Middleware in Redux - Defining middleware in Redux and its purpose in intercepting actions. - Mentioning Redux Saga and Redux Thunk as examples of middleware. - [15:22](https://youtu.be/RapcagVtB-0?t=922s) π€ Advantages of TypeScript in React - Discussing the benefits of TypeScript for error reduction and type safety in React development. - Providing an example of using TypeScript interfaces for component parameters. - [17:16](https://youtu.be/RapcagVtB-0?t=1036s) π Server-Side Rendering with Next.js - Sharing experiences with Next.js for server-side rendering and API handling. - Highlighting advantages like simplified routing and built-in SSR support. - [18:19](https://youtu.be/RapcagVtB-0?t=1099s) π¨ Styling React Components - Mentioning usage of CSS files, styled-components, Sass, Bootstrap, and Material UI for styling. - Explaining the role of the makeStyles function in Material UI. - [19:36](https://youtu.be/RapcagVtB-0?t=1176s) βοΈ Unit Testing Strategy - Describing the use of Jest and Enzyme for unit testing React components. - Sharing a preference for testing all components and utilizing snapshots. - [20:48](https://youtu.be/RapcagVtB-0?t=1248s) π Multi-Language Support in React - Discussing globalizing components using libraries for multi-language support. - Admitting lack of familiarity but mentioning previous usage in a project. - [21:30](https://youtu.be/RapcagVtB-0?t=1290s) π οΈ Interaction with CMS (WordPress) - Sharing experience developing a React plugin for WordPress. - Expressing the need to review documentation for data interaction. - [32:49](https://youtu.be/RapcagVtB-0?t=1969s) π Project Management and Version Control - Describing the use of GitLab for task assignment, branch creation, and merge requests. - Adhering to agile methodologies for project management. - [33:05](https://youtu.be/RapcagVtB-0?t=1985s) πΌ Future Opportunities and Learning - Inquiring about potential project assignments and technology stacks. - Asking about the possibility of working on both front-end and back-end tasks.
The problem with async await was that you didn't put await before res.json() but kudos to you that you remained calm and changed it to .then() chaining and got it done!
Hi bro!, At 2:00 it will print the value of i since set time out is an asynchronous function it will go to the callback queue but In the meantime i variable will be defined
wow...those were actually an easy questions. I am a MERN developer with two years of gap after graduation and yes, 0 working experience or company exposure π. I thought company like infosys have tough interviews. Thank you, I think i gained a litttle confidence. Thanks for sharing...
Difference between framework and library? Answer: who calls who!? if we call the external code, then it is library. If our code is called by another code then it is framework. It is the concept of Inversion of control!
Thank you so much for sharing this interview... It's really helpful. The interview really good
You have to add custom middleware like Redux thunk or saga to do things like fetching data from API. And then you will be able to return a async function from the action which will return a pure JSON object once the API response is received. The interviewer was trying hard to bring you to that point.
bro passing index as key in a map loop is the worst thing you can do in react learnt it the hard way time stamp 30:00
29:30 I think you missed the async keyword. If you are using .then() & .catch(), you don't need to use an async function.
Hi Roshan, These videos really very helpful. Thanks for this initiative πππ
Demonstrated good knowledge with in-depth responses.
@03:36 Why recursion? I think you can do it via deep copy. JSON.parse(JSON.stringify(data))
function myFunction(){ var oa2=2; setTimeout(function(){ console.log(oa); console.log(oa2); },1000) var oa=1; } myFunction() it will not print undefined and 2 instead it will print 1 and 2
thank you for sharing your experience of intervew.
I think, the answer for this code should be 1 after 1sec and not 0. function x() { setTimeout(function() { console.log(i); }, 1000); var i = 1; } x();
@DevAditya