All event handlers will be passed instances of SyntheticEvent, a cross-browser wrapper around the browser’s native event. It has the same interface as the browser’s native event, including stopPropagation() and preventDefault(), except the events work identically across all browsers.
If you add an onClick handler to a button, what kind of object do you receive in the handler and how do you prevent its default action?
What happens if you try to read event.target inside a setTimeout without calling event.persist()? Why?
Show me how you would log the current value of an input field using the event object in an onChange handler.
You notice that after an async API call, event.target is undefined in a click handler. Walk me through how you'd debug this and what React feature might be responsible.
Explain why you might need to call event.persist() when using a debounced function that relies on the event.
If you need to stop propagation of a React synthetic event but still let the native event bubble, how would you accomplish that?
Our drag‑and‑drop component generates many events per second. What trade‑offs does React's event pooling introduce, and how would you optimise the component for performance?
We need to integrate a third‑party library that expects native DOM events. How would you bridge between React's synthetic events and that library without breaking React's event system?
A component currently calls event.persist() on every handler. How would you refactor it to reduce memory overhead while keeping the needed functionality?
We're migrating several teams from React 16 to React 18 and want to remove reliance on synthetic event pooling for future scalability. What architectural changes would you propose and how would you coordinate the migration?
Design a shared event‑handling abstraction that works across React, Vue, and plain‑JS apps in our monorepo. How would you handle the differences between synthetic and native events, and what trade‑offs would you consider?
If you were tasked with building a custom event system to replace React's synthetic events for better telemetry in a large enterprise app, what key design decisions and cross‑team impacts would you need to address?