Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 2 MCQs Components and styles in React

INT252 — Web App Development With Reactjs 50 questions. Pick an option to check it.

Read the notes

0 of 50 answered 0 right 0 wrong , 50 left

  1. Question 1 of 50

    What is the primary building block of a React application?

  2. Question 2 of 50

    Which convention should be followed when naming a React component?

  3. Question 3 of 50

    Which method is required to be defined in a React Class Component?

  4. Question 4 of 50

    How do you define a Functional Component in React?

  5. Question 5 of 50

    What is the React Virtual DOM?

  6. Question 6 of 50

    What is the process of updating the DOM to match the Virtual DOM called?

  7. Question 7 of 50

    What does 'Props' stand for in React?

  8. Question 8 of 50

    Are React Props mutable?

  9. Question 9 of 50

    How do you access props in a Class Component?

  10. Question 10 of 50

    Which attribute is used to assign a CSS class in React JSX?

  11. Question 11 of 50

    What is the data type of the 'style' attribute when using inline styling in React?

  12. Question 12 of 50

    How is the CSS property 'background-color' written in React inline styles?

  13. Question 13 of 50

    What is the primary advantage of using CSS Modules?

  14. Question 14 of 50

    Which file extension is typically used for CSS Modules?

  15. Question 15 of 50

    What is TailwindCSS?

  16. Question 16 of 50

    How do you pass a prop named 'color' with value 'red' to a component 'Button'?

  17. Question 17 of 50

    In a functional component, how do you access props passed as an argument?

  18. Question 18 of 50

    Can a functional component use State?

  19. Question 19 of 50

    What keyword is used to inherit from React.Component in a class component?

  20. Question 20 of 50

    Why is the 'key' prop important in lists?

  21. Question 21 of 50

    Which of the following is NOT a valid way to style a React component?

  22. Question 22 of 50

    In TailwindCSS, how would you apply a red text color?

  23. Question 23 of 50

    What is the correct syntax to import a CSS file 'App.css' into 'App.js'?

  24. Question 24 of 50

    In React, what replaces the HTML 'for' attribute in labels?

  25. Question 25 of 50

    What allows React to be faster than traditional DOM manipulation?

  26. Question 26 of 50

    How do you use a default value for a prop in a functional component?

  27. Question 27 of 50

    When using a Class Component, where do you typically initialize state?

  28. Question 28 of 50

    What is 'children' in React props?

  29. Question 29 of 50

    Which configuration file is generated when initializing TailwindCSS?

  30. Question 30 of 50

    Can a React component return null?

  31. Question 31 of 50

    When using CSS Modules, how do you apply a class named 'header'?

  32. Question 32 of 50

    What is the main difference between Functional and Class components regarding the this keyword?

  33. Question 33 of 50

    Which tool is commonly used to install TailwindCSS in a React project?

  34. Question 34 of 50

    In the Diffing Algorithm, what happens if the root elements of two trees are different types?

  35. Question 35 of 50

    Can you use multiple CSS classes in the className attribute?

  36. Question 36 of 50

    What syntax allows you to render a component inside another component?

  37. Question 37 of 50

    What is a 'Stateless Functional Component'?

  38. Question 38 of 50

    If you want to apply dynamic inline styles based on a variable isActive, which is correct?

  39. Question 39 of 50

    Which feature allows you to pass data from a parent to a child component?

  40. Question 40 of 50

    Which file contains the directives @tailwind base;, @tailwind components;, and @tailwind utilities;?

  41. Question 41 of 50

    How does React handle boolean values in JSX interpolation {true}?

  42. Question 42 of 50

    What is the correct way to export a component as the default export?

  43. Question 43 of 50

    When using inline styles, which unit is assumed for unitless numbers on properties like width?

  44. Question 44 of 50

    Can props contain functions?

  45. Question 45 of 50

    What is the purpose of the super(props) call in a Class component constructor?

  46. Question 46 of 50

    Which of the following is a benefit of Functional Components over Class Components?

  47. Question 47 of 50

    In the context of Virtual DOM, what is 'Batch Update'?

  48. Question 48 of 50

    If a prop is passed to a component but not defined in the component's logic, what happens?

  49. Question 49 of 50

    Can you use standard CSS and TailwindCSS in the same project?

  50. Question 50 of 50

    Which syntax is used to destructure props in a functional component parameter?

That's unit 2

Answer a few questions and your score shows up here.