TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
9.08k stars 12.57k forks source link

More On State: Refactor code example to use better function naming principles. #28281

Closed kahmoh closed 4 days ago

kahmoh commented 5 days ago

Checks

Describe your suggestion

In the opening code example, and throughout we define and use a function called handleIncreaseAge. I believe this could follow a better naming convention by simply being called increaseAge. I remember earlier in the curriculum seeing a suggestion about words such as handle and handler not providing much to function names. This serves as a good example of naming convention for learners reading the lesson.

Path

Node / JS

Lesson Url

https://www.theodinproject.com/lessons/node-path-react-new-more-on-state

(Optional) Discord Name

kahmoh

(Optional) Additional Comments

No response

JoshDevHub commented 4 days ago

@kahmoh Thank you for making this issue.

Can you point to where earlier in the curriculum it was suggested that you avoid the word handle?

kahmoh commented 4 days ago

@JoshDevHub Ive had a look around for the article I saw and couldn't seem to find it. Perhaps I saw it from my own research or it has been changed. Thanks for checking out this issue though!

CouchofTomato commented 4 days ago

Closing for now but if you do come across a good resource for not using handle let us know.