React Questions March 16, 2023 | No Comments 0 votes, 0 avg 32 123456789101112131415 React Questions 1 / 15 1. How many ways of defining your variables in ES6? A. 3 B. 1 C. 4 D. 2 2 / 15 2. Which operator can be used to conditionally render a React component? A. && B. :: C. ?? D. || 3 / 15 3. Props are __________ into other components A. Injected B. Methods C. Injected Methods D. All of these 4 / 15 4. In React.js which one of the following is used to create a class for Inheritance A. Create B. Extends C. Inherits D. Delete 5 / 15 5. React Js is ______based architecture approach A. Module B. component C. package D. class 6 / 15 6. When rendering a list using the JavaScript map() method, what is required for each element rendered? A. id B. key C. data D. index 7 / 15 7. What will happen if you render an input element with disabled = {false}? A. It will not be rendered at all B. It will be rendered as enabled C. It will be rendered as disabled D. All of the mentioned 8 / 15 8. What function allows you to render React content in an HTML page? A. React.mount() B. ReactDOM.start() C. ReactDOM.render() D. React.render() 9 / 15 9. What is React.js? A. Open-source JavaScript back-end library B. JavaScript front-end library to create a database C. Free and open-source JavaScript front-end library D. None of the mentioned 10 / 15 10. What are the two ways to handle data in React? A. Services & Components B. State & Component C. State & Props D. State & Services 11 / 15 11. How many stages are there in React js life cycle A. 1 B. 2 C. 3 12 / 15 12. Using object literal enhancement, you can put values back into an object. When you log person to the console, what is the output? const name = 'Rachel'; const age = 31; const person = { name, age }; console.log(person); A. {{name: "Rachel", age: 31}} B. {name: "Rachel", age: 31} C. {person: "Rachel", person: 31}} D. {person: {name: "Rachel", age: 31}} 13 / 15 13. How can you combine the following arrays using the spread operator? A. const combined = [array1, array2]; B. const combined = …array1 + …array2; C. const combined = […array1, …array2]; D. const combined = array1 + array2; 14 / 15 14. What is the difference between the click behaviors of these two buttons (assuming that this.handleClick is bound correctly)? A. < button onClick={this.handleClick} > Click Me < /button > < /code> < /pre > B. < button onClick={event => this.handleClick(event)}> Click Me < /button > A. Button A will not have access to the event object on click of the button. B. Button B will not fire the handler this.handleClick successfully. C. Button A will not fire the handler this.handleClick successfully. D. There is no difference 15 / 15 15. For controlled components in react A. Source of truth is DOM B. Source of truth can be anything C. Source of truth is component D. none of these Your score is The average score is 30% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Questions, Quiz