coryhouse / coryhouse/react-restaurant-scriptpro
Add submit-rating form with useOptimistic
Open
enhancement
phase-7-ratings
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Goal
Add a submit-rating form below `FoodRatings`. Use `useOptimistic` to insert the new rating into the list instantly, then reconcile with the server response. Roll back on error.
## Acceptance criteria
- [ ] Form posts to the mock API via `useMutation`
- [ ] `useOptimistic` adds the new rating immediately
- [ ] On error, the optimistic rating is removed and an error toast appears
- [ ] On success, the list reflects the server-confirmed rating
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.