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:
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: