Alkin Maystorov
@a-maystorovAll comments
- @CyrusKabirSubmitted over 2 years ago@a-maystorovPosted over 2 years ago
Hi 👋, excellent job on this challenge!
Your question about working with APIs in a more flexible, scalable, and maintainable way depends on the project itself honestly and how many API calls you need to make. I would suggest making a reusable fetchData function or useFetch hook in react, where you pass the URL endpoint as an argument and handle the response inside that function. That way, you can make your API calls anywhere in your project without rewriting the fetch function from scratch. But in this case, where you have only one fetch request, I don't think it's necessary.
I'm not sure if this will help you out, but you can check my solution to the Clock App challenge if you would like a code example. I'm using a reusable fetch function to make calls to three different endpoints. That would give you an idea about maintainability and scalability.
I hope this answers your question; keep on rocking 👊 👩💻 💯.
Marked as helpful1 - @miwa-tanakaSubmitted almost 3 years ago
My first project on this site!
@a-maystorovPosted almost 3 years agoHello 👋,
amazing job on your first project here, everything seems to function properly other than the greeting message. For me it is displaying Good Evening, but should be Good Afternoon.
I would have another look at the logic there and I would suggest working on the layout for different sceen sizes a little bit more, space out the clock and more/less button elements towards the center during the open state.
Other than that if you want to use this for your portfolio I would make the transitions smoother and less overlapping just to make it more pleasing for the eyes.
Keep up the good work! 🔥💯
0