React Questions

0 votes, 0 avg
98

React Questions

1 / 15

1. 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);

2 / 15

2. Which method in a React Component should you override to stop the component from updating?

3 / 15

3.  Which of the following is method is not a part of ReactDOM?

4 / 15

4. What is the default local host port that a React development server uses?

5 / 15

5.  If you want to import just the Component from the React library, what syntax do you use?

6 / 15

6. What is the children prop?

7 / 15

7. Which of the following is NOT a rule for React Hooks?

8 / 15

8. How can you optimize performance for a function component that always renders the same way?

9 / 15

9. What will be the output of the following code?

import React, { Component } from 'react';  
const App = () => {  
    
      return(  
          < div >  
             < h1 className = "hello" > {25+20}< /h1 >   
          < /div >  
      );   
}  
export default App;

10 / 15

10. How can you access the state of a component from inside of a member function?

11 / 15

11. How do you destructure the properties that are sent to the Dish component?

  function Dish(props) {
  return (

{props.name} {props.cookingTime}

);

12 / 15

12. React Js is ______based architecture approach

13 / 15

13. What is the correct syntax to import a Component from React?

14 / 15

14. JSX is acronym for 

15 / 15

15. As soon as the state of react component is changed, component will

Your score is

The average score is 41%

0%