React: Create a Controlled Input - weird code

Unless you need the current state you shouldn’t use an updater function. Using an updater function is problematic with event handling because of how React deals with events.

More info with some links:


Edit: I guess it would be nice if the challenge failed but I’m not sure what changes that would take or if it’s feasible.