Performance·Advanced·Conceptual·1 min read
How do you keep an event handler from inflating INP?
Short interview answer
Do only the work needed for immediate visual feedback synchronously, then yield to the main thread so that frame can paint, then run the rest as a separate task. Also avoid forced synchronous layout — writing to the DOM then reading a layout property in the same handler.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.