A suggestion to make the code more idiomatic #4
|
Hi @kaiosilveira ! I was reading this refactoring and noticed that this logic to calculate the outstanding amount: extract-function-refactoring/index.js Line 28 in 2935484 could be potentially refactored forward to be more JS idiomatic, probably using a |
Replies: 1 comment
|
Hey Dan! Thanks for sharing your thoughts! Yeah, I completely agree with you. For now, I'm basically implementing the code exactly as it is in the book so I don't get lost halfway through the refactoring and readers that also read the book will not notice any differences. Nevertheless, I could create a new section at the end of the refactoring docs, something like "additional refactorings" or "departing thoughts", etc. Thank you for the suggestion. 👊🏽 |
Hey Dan!
Thanks for sharing your thoughts!
Yeah, I completely agree with you. For now, I'm basically implementing the code exactly as it is in the book so I don't get lost halfway through the refactoring and readers that also read the book will not notice any differences. Nevertheless, I could create a new section at the end of the refactoring docs, something like "additional refactorings" or "departing thoughts", etc.
Thank you for the suggestion. 👊🏽