Showing posts with label Virtual DOM. Show all posts
Showing posts with label Virtual DOM. Show all posts

Sunday, 10 March 2019

Interview Questions of React JS

I have given few Interviews in React JS and this blog is based on that experience. Usually for React JS interviews it is expected you have a deep understanding about JavaScript and other few libraries used with React JS like Redux, Thunk and Redux Saga. In 2 interviews I was asked questions on HTML5 and CSS3 even though the profile was React JS Developer.

If you are giving interview in product based company there are usually 2 technical round. In second technical round you have been asked to make a mini application in React JS like a countdown timer.

Q1. What is Virtual DOM in React JS?
Q2. What are the major advantages of React JS over Angular JS?
Q3. What are the limitations of React JS ?
Q4. How will you decide when to use React JS?
Q5. What is component in React JS?
Q6. Explain how will you pass property from Child Component to Parent Component?
Q7. Explain component lifecycle?
Q8. What is JSX?
Q9. Differentiate Props vs State?
Q10. Explain render method and its use?
Q11. What is events in React JS and explain its types?
Q12. What is hooks?
Q13. What is fragments?
Q14. What is HOC in React JS and its use?
Q15. Explain Redux and when it is used?
Q16. What is Redux Thunk and Redux Saga? When do we use thunk and when do we use saga?

Wednesday, 31 January 2018

React Introduction - What, Why, Who

React Introduction - What, Why, Who

What is react ?

ReactJS is an open source JavaScript library Developed by Jordan Walke, a software engineer working at Facebook


Why React?

1) It makes easier developing a large Single Page Application (SPA) because it allows a developer to break down the complex UI into simpler components. We can reuse components as needed and compose bigger components from smaller ones.


2) React’s reconciliation algorithm – It implements  in Virtual DOM that makes the application fast. Virtual DOM allows ReactJS to know when exactly to re-render because it can detect when the data has changed.

Note - DOM (Document Object Model) is an object that is created by the browser each time a web page is loaded which can dynamically add or remove the data at the back end.

3) One-Way Data Binding - ReactJS follows unidirectional data flow or one way data binding. Which means the data flows in a single direction because of this application’s state is contained in specific stores. As a result, rest of the components remains loosely coupled and application is more flexible leading to increased efficiency.

4) React follow the principle of immutable data. It means we create the copies of object and replace them instead of modifying the original.

5) Server-Side Rendering(SSR): It you to pre-render the initial state of our react components at the server side only. By this the browser can now start rendering without having to wait for all the JavaScript to be loaded and executed. As a result, the webpage loads faster. Here the user will be able to see the web page instead of React downloading the JavaScript

Who uses React ?

Instagram web site and Facebook newsfeed section is developed with react and it is used by other companies such as PayPal, Uber, Apple and Airbnb.



Chapter : 1 - First code in Node JS Previously I have written a blog about Getting Started with Node JS and its installation. Now lets s...