stefi23 / ski-with-me

⛷️ 🏂 Find people to go ski/snowboard with
2 stars 1 forks source link

Refactor clean code #41

Closed stefi23 closed 3 years ago

stefi23 commented 3 years ago

40

@giacomorebonato I think after doing a big cleaning in the code and another refactor as well on the SelectBox in the same way we did on the Dropbox it seems to works. Magic :)

I'm going to look at the variables' names again to see if I can make some changes there.

I see that there is still some repeated code. Maybe I can figure out a way to get it in a custom hook. Will keep you posted.

Thank you!

stefi23 commented 3 years ago

Hi @giacomorebonato ,

I've done more refactoring. I created a custom hook for the callback functions that had the same pattern in App.js. I wasn't sure how to name the hook and called it useCallback. Do you think this is a good name?