SockReviewForm: Allow users to leave a review
Opened this issue · 1 comments
Laoujin commented
File: ´SockReviewForm.tsx´
Allow users to leave a Sock review.
// models.ts
export interface SockReviewModel {
name: string;
rating: number;
fullReview: string;
}
- Add a form with name, rating and fullReview
- Add the form using Formik
- Add validation: name (required), rating (1-5) and fullReview (may not contain the word "smelly")
- If passes validation, post to backend url
/api/socks/:id/review
- Create an ExpressJS backend and console.log the body 😎
- Persist the body (FileSystem or database) 😈
timdebelder007 commented
it's mine