Day 2 of #100daysofcode
Andrés
Posted on March 14, 2024
Today I continued the first project I'm going to be building: the trivia game that I decided to call "nerdology" (you could win a prize by asking all the questions correctly!).
I mainly planned how it should look, what additional features I could add without adding too much complexity and how I should approach the development of this project: I decided to focus first on the main functionalities and leave the design for later.
Then, I added the function to fetch the trivia questions from, however I spent I bit of time trying to resolve a challenge: the trivia API only lets 1 API call every 5 seconds, and React in strict mode was making more calls to it because of its testing mechanisms.
To resolve this, I decided to use Lodash library to throttle the number of API request and not cause a network issue.
And at the end, it worked precisely on catching any possible errors properly.
I hope the planning will have good results later.
Posted on March 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024