Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 4 years ago

Time tracking dashboard with vanilla JS

Zeiyar Lynn•335
@Zeiyar-Lynn
A solution to the Time tracking dashboard challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have a question. In this challenge, for fetching the data from a JSON file, I used classic XML. Firstly I fetch the data, store it in a variable and change the HTML from what button is clicked. This is okay as I don't need to wait to get the data back(I assume users won't click the button as soon as the page is loaded). I'm also aware it takes time to get back the data from the server. The question is "Should I fetch the data only when a button is clicked or should I fetch it first(only once) and store it as I did".

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Zeiyar Lynn's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License