Assessment 02 · Forms, effects and asynchronous work
Attempt after lesson 08. Provisional 40–50 minutes. Six questions, two points each. Aim for 10/12 and correct questions 3 and 5. Each question needs a conclusion and a reason or concrete implementation detail.
- The practice form uses noValidate. Does required still guarantee that its submit handler only receives nonempty participant text? State what the handler must do and what valid synthetic data are.
- A form confirms success and then the user edits a field. What should happen to the old confirmation? How should reset treat controlled values and errors?
- Classify filtering by query, responding to Submit, and synchronizing saved IDs with browser storage. Which need an effect, and why?
- An effect subscribes to resize and reads a reactive prop. What belongs in cleanup and the dependency list? What can development Strict Mode reveal?
- Request A starts, B starts, B succeeds, then A rejects. What must prevent A's error from replacing B's successful screen? Why is abort alone not a complete explanation of your state policy?
- Explain the difference between loading, successful empty data, HTTP failure, malformed JSON and wrong-shape JSON. Describe the UI for a retry that fails again.
Include a short request timeline and a storage-failure recovery explanation. Answers and scoring.