Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master React, Quick Code tutorial. Part 8 #32

Open
7 tasks
atherdon opened this issue May 28, 2018 · 0 comments
Open
7 tasks

Master React, Quick Code tutorial. Part 8 #32

atherdon opened this issue May 28, 2018 · 0 comments
Assignees

Comments

@atherdon
Copy link
Member

https://medium.com/quick-code/lets-learn-react-chapter-8-react-forms-f3137a5c07c7

Expected result

  • Read this tutorial chapter
  • follow code steps
  • move your code to this repository(at least one commit per day)
  • explain to me, what did you learn from it in a few sentences(not less than 5)
  • pass the test section
  • after reviewing your progress and closing this issue - you can move to the next chapter.

Test

  • right now form looks very simple.
    And usually Meal form have more fields. So let's add them.

By using this database schema: https://github.com/ChickenKyiv/recipe-api-only/blob/master/Recipe-ChickenKyiv-Release%231%20Schema%20%20%20SqlDBM.png
We'll advance this form. I'm pretty sure that when you'll add all fields in this form, you'll realize that it's better to create a sub-components for each form field.
So, Meal is a similar Model to Recipe.
so we'll add all important things to that form.

  • Each recipe has attributes: diets, allergies, etc. - text field for each one
  • Each recipe has a weekday field(like today i have chicken, tomorrow i'll eat soup) - i assume it'll be checkbox.
  • Nutritions is a sub-array with a few fields() - text fields
  • Ingredients is a sub-array with a few ingredients inside(like chichen brests, salt, pepper, etc.) Let's have 4 ingredients per meal.

And, make it works :) this is when a real ES6 is coming into the scene.
and don't forget that each field will also have an id field(later it can be useful, when you'll grab data from database)

#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants