Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

How do you handle events in React?
A. Using all lowercase event names
B. Using inline HTML event attributes
C. Using addEventListener in render
D. Using camelCase event handlers like onClick
Direction: Choose the correct option

Q2.

What is the difference between React event handling and DOM event handling?
A. React events are not cancellable
B. React events are named in lowercase
C. There is no difference
D. React events are synthetic, cross-browser wrappers
Direction: Choose the correct option

Q3.

In a class component, how do you ensure 'this' is bound in an event handler?
A. Use .bind(this) in constructor or arrow function
B. No need
C. Use event.target
D. Use global this
Direction: Choose the correct option

Q4.

How do you pass an extra argument to an event handler?
A. Both A and B
B. onClick={handler.bind(this, arg)}
C. onClick={() => handler(arg)}
D. onClick={handler(arg)}
Direction: Choose the correct option

Q5.

What does the event object passed to React event handlers represent?
A. The native DOM event
B. A SyntheticEvent that wraps the native event
C. It's undefined
D. A custom React event