React Fundamentals

0% completed

Previous
Next
Quiz
Question 1
What are props in React?
A
A way to manage state in a component
B
Short for "proposals" in JavaScript
C
A method for handling component lifecycle
D
A mechanism to pass data from a parent to a child component
Question 2
How are props passed to a child component in React?
A
Using the state object
B
By calling setProps() inside the child component
C
As attributes inside the component tag
D
Through the useProps hook
Question 3
What is prop drilling?
A
A method for optimizing performance in React
B
A technique where props are passed through multiple nested components unnecessarily
C
A way to modify props directly inside a component
D
A React hook for handling complex state
Question 4
What happens if a child component tries to modify a prop directly?
A
The modification applies only to that component
B
React throws an error because props are read-only
C
The prop value gets updated globally in the application
D
The parent component automatically updates with the new value

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next