Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

React.js responsive site. Using Class based components and context

#react#sass/scss
aropsta 110

@aropsta

Desktop design screenshot for the Time tracking dashboard coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any suggestions or questions are welcome! :smile:

Community feedback

P

@ccreusat

Posted

Nice challenge ! Interesting to see the use of React context with Class components.

I would suggest to use .map() method to render your <Card> component instead of selecting all your item like this :

let work = inputData[0];
let play = inputData[1];
let study = inputData[2];
let exercise = inputData[3];
let social = inputData[4];
let selfCare = inputData[5];

You could do

{ inputData.map((item, index) => <Card key={index} data={item}></Card>}

index could be replace with ID (and it's a better practice) example : key={item.id}

Hope this helps :)

Marked as helpful

1

aropsta 110

@aropsta

Posted

@ccreusat Thanks for that! This part had always bothered, I knew there was a better way

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord