NEW PROJECT – Open Library Search

Category: | Posted on:February 25, 2024
open library search results

Added another API fetching project, Open Library Search. The app pings the Internet Archive‘s Open Library Search API to retrieve author, publication, purchase, and topic data for a user-provided book title.

Objective

My goal is to continue cranking out simple fetch projects until I can do them without relying on a crutch. I used my previous Public APIs List project to pick out the topic for this one. Open Library Search API provides a lot of data to work with in a mix of strings and arrays that provided an opportunity to diversify the formatting of the data.

Development

I’m settling into a pattern of establishing states for data, error, and loading right out of the gate. I also created a query state to capture the user’s input, then tied the data fetching function to a useEffect() hook with query as a dependency so that the search would fire each time the user submits a new title.

I almost got try/catch down blind, but I forgot to make my fetch asynchronous initially.

In my Public API List project I didn’t bother with Enter key functionality, but this time I added it. It’s more convenient for testing and I should make it a habit.

Hurdles

This went pretty smoothly and I didn’t encounter any major roadblocks. I do have a problem remembering array methods, however, and that’s a weakness I’m looking to overcome. This project required the use of several that I always forget about until I Google them. The fetch API is another area where I still need to reference syntax, but at this point I always know what I want to do and what’s needed.

Takeaways

I got to practice checking and handling array data with more depth than my past project. I got to use isArray(), .slice(), and .join(). I think I fully get props now and had no trouble passing data down through my components. The .map() method has clicked too. I just need to remember not to forget to add a  currentValue and index to the function inside.

Related Logs


  • UPDATE – Simple Responsive Portfolio Svelte

    January 26, 2026

    Refactored the code in the Simple Responsive Portfolio Svelte to use updated Svelte 5 syntax for state and props. Svelte 5 Syntax Svelte 5 retired the prior export syntax. Before, the parent would establish state with a let variable declaration: A child component could then receive it with an export statement: The new syntax for […]

    Continue Reading
  • NEW PROJECT – Simple Responsive Portfolio Svelte

    January 23, 2026

    The Simple Responsive Portfolio Svelte is a remake of my Simple Responsive Portfolio project in Svelte 5. Objective I need to brush up on my Svelte skills since it updated to v5. My last foray was a photo album for my wedding that used Svelte Cloudinary to handle uploads. This project was just a simple […]

    Continue Reading
  • RIP Glitch.com

    January 12, 2026

    Glitch.com, the service I was using to host some of my projects for free, has terminated its hosting services. I didn’t find out until after the grace period, so everything I had up there is gone, but it was all just copies of existing repos anyway. I’ve had to migrate the original Game Picker 9000, […]

    Continue Reading