Repetitive logic in the form submit event on index.js
ClaudiaRojasSoto opened this issue · comments
Claudia P. R. Soto commented
Excellent code. Good logic. It fulfills its function. However, there is something that I think you can improve:
In the index.js file, in the submit event of the form, you have boilerplate logic to add a task. You can extract that logic into a separate function and call it from both places to avoid code duplication. For example: