Finished React Leaderboard!

Finished React Leaderboard!
0.0 0

#1

Hey guys,

I finished my Leaderboard project. I would appreciate any feedback or constructive criticism. Thanks!


#2

A couple of feedbacks that pops in my mind:

  • 1 you’re not handling network/request error.

You should get in the habit of handling failures/error gracefully, to better enhance the UX.
Just to start you can simply catch any error in the promise and then decide what to to:

axios.[...]
  .then[...]
  .catch( error => 
    // do something with the error
  );
  • 2 don’t repeat yourself too much:

componentDidMount, allTimeHandler and recentHandler are all three virtually the same function but with just one or two different params… I’m sure you’d be able to refactor those in just one function :slight_smile:

Nonetheless good job :+1:
Hope it helps.