Design comparison
Solution retrospective
As it was very hard for me to figure out a way to update the times on the activity cards, I am really excited I got to do it using only the official React Documentation as reference.
The way I did it was by making both current time and previous time separate components, but that was not my first approach so I would definitely start by making almost everything as a component from the beggining.
What challenges did you encounter, and how did you overcome them?Using the react useState to update different components was very challenging.
I overcame this by 'hoisting' the state variable then passig it as a prop to every component that depended on it.
What specific areas of your project would you like help with?I would love to get some feedback on how I could improve especially the organization and efficiency of the code I wrote, because it is a little messy 😆
Community feedback
- @Artur-NeriPosted 4 months ago
Forgot to post along with the solution, but I could not figure out how to import the json data into my script, so I made a variable in the script itself with it.
Any tips on how I could have done that will be really appreciated!
0@samuel-aduPosted 4 months ago@Artur-Neri very clean solution to this challenge you have there.
You can import the json data using this code:
import data from './data.json' assert { type: 'json' };
0
Please log in to post a comment
Log in with GitHubJoin 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