SherylHohman / ReactND-C3-Project2-Readable

BSD 2-Clause "Simplified" License
1 stars 0 forks source link

NewPost: form validation instead of default values #17

Closed SherylHohman closed 6 years ago

SherylHohman commented 6 years ago

NewForm.js line 95

SUGGESTION Sometimes using default properties like you're doing here is an incredible choice! However – in the case of a posting app, I believe that you should focus on validating the form fields – if they're blank is probably because the user has forgot to type something. :thumbsup:

When working with simpler forms – that don't require complex validations – a good alternative is to use the form-serialize library, it leverages the native web capabilities for retrieving the input values inside a form so you won't have to do it manually.

If you're looking for something more robust – I'd then recommend final-form, an amazing library by the same creator of redux-form but a lot faster and more lightweight. It's the result of years maintaining the most used form library by the redux community. :dart:

SherylHohman commented 6 years ago

Commits that Address and Fix this issue:

c8738dd - (HEAD -> working_branch_review1) feat: form validation for (modal) edit comment