Tell Me, Is there a way to improve this?

Tell Me, Is there a way to improve this?
0

#1

I already build what I intend to make. But, can someone tell me, is there a better way to do this? Is there a way to make this more clean or effective?

Here the CodeSanbox: https://codesandbox.io/s/5ovwpr4mp

Thanks.


#2

It was great effort. I would suggest you the followings

  1. Make the list must has an obvious heading (Name, Weight, Height, Percentage, Calorie) and it should list down all the user’s data
  2. Apply the css class on the genre of the data set e.g: for man blue, for women pink
  3. The next and prev button will need to operate when the data list beyond some number e.g: 10 records etcs.

#3

I will try to do it later.

And, may I ask for your opinion? Is there a better way to handle the data when prev / next is clicked? I just don’t like to see many repetitions in my code.

Thanks.


#4

Sorry for replying you late. Yeah the simplest way could be put 2 buttons each for next and prev , and iterate between the data list that you already have it. OR try to encapsulate third party navigation bar.