All questions
- Can you update props in react? You can’t update props in react js because props are read-only. Moreover, you can not modify props received from parent to child. 1
- Ho can you re-render a component without using setState() function? You can use forceUpdate() function for re-rending any component. 1
- Explain the term reconciliation When a component’s state or props change then rest will compare the rendered element with previously rendered DOM and will update the actual... 1
- How can you share an element in the parsing? Using the State, we can share the data. 1
- When should you use the top-class elements for the function element? If your element does a stage or lifetime cycle, we should use top-class elements. 1
- Explain the term synthetic events It is actually a cross-browser wrapper around the browser’s native event. These events have interface stopPropagation() and preventDefault()... 1
- What is the reduction? The reduction is an application method of handling State. 1
- What can be done when there is more than one line of expression? At that time a multi-line JSX expression is the only option left for you. 2
- What are the major issues of using MVC architecture in React? Here are the major challenges you will face while handling MVC architecture: DOM handling is quite expensive Most of the time applications w... 1
- How can a browser read JSX file? If you want the browser to read JSX, then that JSX file should be replaced using a JSX transformer like Babel and then send back to the brow... 1
- What is Babel in React js? Babel, is a JavaScript compiler that converts latest JavaScript like ES6, ES7 into plain old ES5 JavaScript that most browsers understand. 1
- What is the use of Webpack? Webpack in basically is a module builder. It is mainly runs during the development process. 1
- What is Context? What is Context? React context helps you to pass data using the tree of react components. It helps you to share data globally between various react component... 1
- What are reacted portals? Portal allows you to render children into a DOM node. CreatePortalmethod is used for it. 2
- Explain strict mode StrictMode allows you to run checks and warnings for react components. It runs only on development build. It helps you to highlight the issu... 1
- What is the use of empty tags <> </>? Empty tags are used in React for declaring fragments. 2
- Explain error boundaries? Error boundaries help you to catch Javascript error anywhere in the child components. They are most used to log the error and show a fallbac... 1
- What are children prop? Children props are used to pass component to other components as properties. You can access it by using {props.children} 1
- Explain the use of ‘key’ in react list Keys allow you to provide each list element with a stable identity. The keys should be unique. 1
- What is ‘create-react-app’? create-react-app’ is a command-line tool which allows you to create one basic react application. 1
- What kind of information controls a segment in React? There are mainly two sorts of information that control a segment: State and Props State: State information that will change, we need to util... 1
- Explain pure components in React js Pure components are the fastest components which can replace any component with only a render(). It helps you to enhance the simplicity of t... 2
- State the main difference between Pros and State The main difference the two is that the State is mutable and Pros are immutable. 1
- What are the lifecycle steps of React? Important lifecycle steps of React js are: Initialization State/Property updates Destruction are the lifecycle of React 1