REACT NATIVE QUIZ DESCRIPTION Total Questions −30 00 Max Time − 15:00 For controlled components in react Source of truth is DOM Source of truth is component state Source of truth can be anything None of above Regarding React js components, which of following statement is true? function components can have state function components are light weight class components are light weight class components are faster than function component With an arrow function – this keyword represents _____. Content Header object Current object Child object ES6 stands for ____. ECMAScript 6 Extended-JavaScript Version 6 Extensive-JavaScript 6 Expanded-JavaScript 6 Select the correct statement about uncontrolled components. It maintains its internal states data is controlled by the DOM itself A ref is used for their current values All Number of elements, a valid react component can return 1 2 3 5 What would be the output of the following example? var Helloword=(props)=> { return( <div> Hello World 1 </div> &n Hello World 1 Hello World 2 Hello World 1 Hello World 2 Error In which of the following condition, the React.js Lifecycle method static getDerivedSateFromProps(props, state) is called? The component is created for the first time. The state of the component is updated. Both of the above. None of the above. Which of the following best defines the "key" prop? "Key" prop is used to look pretty, and there is no benefit whatsoever. "Key" prop is a way for React to identify a newly added item in a list and compare it during the "diffing" algorithm. It is one of the attributes in HTML. It is NOT commonly used in an array. In ES6 – Which method refers to the parent class? parent() super() top() main() Which ReactJS command is used to create a new application? create-react-app new-react-app create-new-reactapp react-app How to install create-react-app? npx create-react-app -new my-app npx create-react-app -app my-app npx new-react-app my-app npx create-react-app my-app Which of the following is the correct name of React.js? React React.js ReactJS All of the above What is a state in React? A permanent storage. Internal storage of the component. External storage of the component. None of the above. How many elements does a react component returns? 1 0 Multiple elements with one root element None of the above What are Props? Props are arguments passed into React components Props are functions in the ReactJS Props are used to returns multiple values from the function All of the above What will happen if you render an input element with disabled = {false} It will be rendered as enabled It will be rendered as disabled It will not be rendered at all None of the above We can update the state in React.js by calling to setState() method. These calls are: Synchronous in nature. Asynchronous in nature. Are asynchronous but can be made synchronous when required. None of the above. What is the use of the create-react-app command in the React.js application? It is used to update a React app. It is used to create a new React app. It is used to install dependencies. None of the above. React is also known as _____. ReactJS js Both A. and B. None of these Which of the following statement is true for controlled components in React.js? The source of truth is DOM. The source of truth can be anything. The source of truth is a component state. None of the above. A class is a type of function, but instead of using the keyword function to initiate it, which keyword do we use? Constructor Class Object DataObject Does React.js create a VIRTUAL DOM in the memory? TRUE FALSE Can be true or false Cannot say For uncontrolled components in react Source of truth is DOM Source of truth is component state Source of truth can be anything None of above The state in react can be updated by call to setState method. These calls are Synchronous in nature Asynchronous in nature Are asynchronous but can be made synchronous when required None of above Which of the following keyword is used to create a class inheritance? Create Inherits Extends This In ES6 – Why arrow functions are used? To access pointer variable To access variable of a class Both A. and B. Write shorter function syntax To update state in react forcefully, which method is used setState forceUpdate Both of above None of above What is the default port for webpack dev server? 3000 8080 3306 8808 Virtual DOM creates a copy of the whole DOM object FALSE TRUE Previous Next Total Question16 Wrong Answer13 Right Answer13