How will you improve the performance of a React Application?

When we create a rendered component, React creates a virtual DOM for its element tree in the component. Now, whenever the state of the component changes, React recreates the virtual DOM tree and compares the result with the previous render.

What are the different ways to manage a state in a React application?

Local state,Global state,Server state,URL state A common example of global state is authenticated user state. If a user is logged into our app, it is necessary to get and change their data throughout our application.

How does prototypical inheritance work?

prototypical inheritance refers to the ability to access object properties from another object. We use a JavaScript prototype to add new properties and methods to an existing object constructor. We can then essentially tell our JS code to inherit properties from a prototype.

You have an array of products. Each product has a name, price, description, etc. How will you implement a search to find products by name?

We map the product and get this product id and .and fatch this id .when we fatch the id we get every details o this prooduct .and show any where product details.

You have an array of products. Each product has a name, price, description, etc. How will you implement a search to find products by name?

A unit test is a way of testing a unit - the smallest piece of code that can be logically isolated in a system. In most programming languages, that is a function, a subroutine, a method or property. The isolated part of the definition is important. In his book "Working Effectively with Legacy Code.

Copyright © 2022 -PC HOUSE