NEW REACT PROJECT – Public APIs List
I built a simple app called Public APIs List that prints a list of all the free APIs available through public-api.
Objective
I want to get more comfortable with the JavaScript fetch API. I needed inspiration for another project to work on and figured I’d start by looking at big lists of free APIs that I could hook into. Turns out there are APIs for APIs. So just for some practice I grabbed one and spat out the full list for easier reading.
Development
There’s only one component. It uses a basic asynchronous fetch to grab the API entries. Then they get mapped into list items and spit out their titles.
This is my second go with Vite and it seemed to go a little smoother than last time. I played around with suspending the cache, since the app is so threadbare and that seemed to help with the refresh issues a bit.
Hurdles
The refresh issues with Vite are still there. I took to re-starting the dev server any time it happened. Fortunately the startup is lightning fast. I can’t imagine this is the normal workflow. There’s still something I’m missing.
Takeaways
There’s more data attached to each entry in the API, so I’ll probably enhance this project a bit more before picking one of the APIs to build out into another app. Hopefully I’ll work out a better solution for Vite refreshing as I go.