|
Que No. 1 ) What is React?
A.) A programming language
B.) A JavaScript library
C.) An operating system
D.) A database
|
Que No. 2 ) In React, what is used to pass data from a parent component to a child component?
A.) Props
B.) State
C.) Variables
D.) Functions
|
Que No. 3 ) What is JSX in React?
A.) JavaScript Extension
B.) JavaScript XML
C.) JavaScript Style XML
D.) JavaScript Express
|
Que No. 4 ) Which function is used to render a component in React?
A.) render()
B.) display()
C.) show()
D.) renderComponent()
|
Que No. 5 ) What is the purpose of the ReactDOM library in React?
A.) To handle routing in React applications
B.) To interact with the Document Object Model
C.) To manage global state in React applications
D.) To create reusable UI components
|
Que No. 6 ) What is the primary purpose of the useState hook in React?
A.) To fetch data from an API
B.) To manage component lifecycle
C.) To store and update component state
D.) To create a new component
|
Que No. 7 ) What is a component in React?
A.) A function that returns HTML
B.) A JavaScript class
C.) A JavaScript object
D.) A JSON file
|
Que No. 8 ) Which React method is called after a component has been rendered to the DOM?
A.) componentDidMount()
B.) componentDidUpdate()
C.) componentWillMount()
D.) componentWillRender()
|
Que No. 9 ) What is the purpose of the useEffect hook in React?
A.) To perform side effects in functional components
B.) To define component state
C.) To render JSX elements
D.) To create custom hooks
|
Que No. 10 ) How can you conditionally render content in React?
A.) Using the if-else statement
B.) Using the switch-case statement
C.) Using the ternary operator
D.) Using the for loop
|