A small React component stores the confirmation button text and creates a deferred submit handler. You need to determine the exact string the program will print to the console after the scenario runs.
Requirements
- Assume the component mounts once.
- A regular browser
setTimeout is used.
- You must provide exactly one stdout line.
- The answer must reflect the actual behavior of the code, not the expected UI behavior.
Reproduction
- Run the file as a normal React app page.
- After mounting, the following scenario runs automatically:
- a deferred submit is scheduled;
- then the button label state changes synchronously;
- when the timer fires, the handler prints the final result to the console.
- Determine the exact
console.log output.
Expected behavior
- In the answer, provide one exact line, including case, colon, and spaces.
- There must be no additional lines in the answer.