React Questions March 16, 2023 | No Comments 0 votes, 0 avg 2 123456789101112131415 React Questions 1 / 15 1. What is the children prop? A. A property that lets you pass data to child components B. A property that lets you set an object as a property C. A property that lets you nest components in other components D. A property that adds child values to state 2 / 15 2. 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 3 / 15 3. What is the use of React hooks? A. To manage state and side effects in functional components B. To manage styles in functional components C. To manage state and side effects in class components D. To manage styles in class components 4 / 15 4. 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}} 5 / 15 5. What happens when the following render() method executes? render(){ let langs = ["PHP","ES6","JAVA"] return ( < div> {langs.map(it => < p > {it} < /p > )} < /div > ) } A. Error:cannot use direct javascript code in jsx B. error:should be replaced with a for..loop fo correct output C. display the list of language in the array D. displays nothing 6 / 15 6. 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 7 / 15 7. What is the default local host port that a React development server uses? A. 3000 B. 3500 C. 5000 D. 8080 8 / 15 8. Which method in a React Component should you override to stop the component from updating? A. shouldComponentUpdate B. will ComponentUpdate C. componentDidUpdate D. componentDidMount 9 / 15 9. Props are __________ into other components A. Injected B. Methods C. Injected Methods D. All of these 10 / 15 10. When rendering a list using the JavaScript map() method, what is required for each element rendered? A. id B. key C. data D. index 11 / 15 11. Which of the following is used in React.js to increase performance? A. Virtual Dom B. Original Dom C. Both A And b D. None of all 12 / 15 12. Which of the following is NOT a rule for React Hooks? A. Hooks can be called in Class or Function components B. Hooks cannot be conditional C. Hooks can only be called inside React Function components D. Hooks can only be called at the top level of a component 13 / 15 13. As soon as the state of react component is changed, component will A. Does nothing,you have to call render method to render the component again B. re-render the component C. be created again from scratch D. none of these 14 / 15 14. To get the first item from the array (“cooking”) using array destructuring, how do you adjust this line?const topics = [‘cooking’, ‘art’, ‘history’]; A. const first = ["cooking", "art", "history"] B. const [] = ["cooking", "art", "history"] C. const [, first]["cooking", "art", "history"] D. const [first] = ["cooking", "art", "history"] 15 / 15 15. React separates the user interface into components. How are components combinded to create a user interface? A. With webpack B. With code splitting C. By nesting components D. By putting them in a folder structure Your score is The average score is 17% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Questions, Quiz