Friday, 13 February 2026

mcq reactjs vol1

 MCQ on REACTJS Vol1

1.

What is the primary reason for using the 'Virtual DOM' in React?



  • 2.

    Which React hook is intended to handle side effects such as data fetching or subscriptions?


  • 3.

    In React, what is the 'key' prop used for when rendering lists?


  • 4.

    What is 'JSX' in the context of React development?


  • 5.

    How can you pass data from a parent component down to a child component?


  • 6.

    What does the 'useCallback' hook return?

  • 7.

    What is the correct way to update state in a functional component using 'useState'?


  • 8.

    What is the purpose of 'React.Fragment'?


  • 9.

    Which hook provides an alternative to 'useState' for complex state logic?


  • 10.

    What happens if you omit the dependency array in 'useEffect'?


  • 11.

    What is 'Prop Drilling'?


  • 12.

    What is the purpose of 'useRef'?


  • 13.

    Which of these is a Rule of Hooks?


  • 14.

    What does 'React.memo' do?


  • 15.

    How do you handle a click event in a React component?


  • 16.

    What is the 'Context API' primarily used for?


  • 17.

    Which method is used to create a context object?



  • 18.

    What does it mean for a component to be 'Controlled' in React forms?


  • 19.

    What is the purpose of 'useLayoutEffect'?


  • 20.

    In React, what does 'Lifting State Up' refer to?



  • Ans

  • 1. A

  • 2. B

  • 3. A

  • 4.A

  • 5.B

  • 6.A

  • 7.C

  • 8.C

  • 9.B

  • 10.D

  • 11.B

  • 12.B

  • 13.B

  • 14.C

  • 15.C

  • 16.B

  • 17.B

  • 18.B

  • 19.B

  • 20.A


  • No comments:

    Post a Comment