Frontend Engineer
The callback keeps reading the initial value.
- 1Your approach
- 2The follow-up
- 3Reflect & learn
THE INTERVIEWER ASKS
The scenario
A long-lived callback logs an outdated form value after the user edits the form. Explain how closures can produce this behavior.
How would you approach it?
Explain your assumptions, your approach, and why you chose it.