React Questions March 16, 2023 | No Comments 0 votes, 0 avg 110 123456789101112131415 React Questions 1 / 15 1. Consider the following code from React Router. What do you call :id in the path prop? > Route path=”/:id” / > A. This is a route modal B. This is a route parameter C. This is a route splitter D. This is a route link 2 / 15 2. What is the output of the below code ? var Geeks=(props)=> { return( DSA Course 1 DSA Course 2 ); } ReactDOM.render( < DSA Course/ > ,mountNode) A. DSA Course 1 B. DSA Course 2 C. DSA Course 1 DSA Course 2 D. Error 3 / 15 3. Which of the following function is used to change the state of the React.js component? A. this.setState B. this.setChangeState C. this.State{} D. this.useState 4 / 15 4. How many stages are there in React js life cycle A. 1 B. 2 C. 3 5 / 15 5. Babel is a __________? A. An interpreter B. A compiler C. A transpiler D. Both 2 &3 6 / 15 6. Which of the following command is used to Install create-react-app? A. npm install create-react-app B. npm install -f create-react-app C. npm install -g create-react-app D. install -g create-react-app 7 / 15 7. 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 8 / 15 8. How do you fix the syntax error that results from running this code? const person =(firstName, lastName) => { first: firstName, last: lastName } console.log(person("Jill", "Wilson")) A. Wrap the object in parentheses. B. Call the function from another file. C. Add a return statement before the first curly brace. D. Replace the object with an array. 9 / 15 9. What is the declarative way to render a dynamic list of components based on values in an array? A. Using the reduce array method B. Using the <Each /> component C. Using the Array.map() method D. With a for/while loop 10 / 15 10. Which is not true about Virtual DOM in React JS? A. can not directly update HTML B. It uodates faster C. Dom manipulation is very easy D. too much memory wastage 11 / 15 11. To create a constant in JavaScript, which keyword do you use? A. const B. let C. constant D. var 12 / 15 12. Arbitrary inputs of components in React are called A. Kyes B. Props C. Elements D. Ref 13 / 15 13. 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 14 / 15 14. React Js is ______based architecture approach A. Module B. component C. package D. class 15 / 15 15. What is a react.js in MVC? A. Controller B. Middleware C. Model D. Router Your score isThe average score is 43% LinkedIn Facebook VKontakte 0% Restart quiz By WordPress Quiz plugin Questions, Quiz