VOOZH about

URL: https://thenewstack.io/new-york-public-library-on-choosing-react-to-rebuild-website/

⇱ New York Public Library on Choosing React To Rebuild Website - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-11-15 11:00:29
New York Public Library on Choosing React To Rebuild Website
Frontend Development / JavaScript

New York Public Library on Choosing React To Rebuild Website

The New York Public Library knew it needed a React-based framework for rebuilding its Digital Collections site. It chose Next.js.
Nov 15th, 2024 11:00am by Loraine Lawson
👁 Featued image for: New York Public Library on Choosing React To Rebuild Website
Photo by Loraine Lawson.

The New York Public Library knew it needed a React-based framework for rebuilding its Digital Collections site. It chose Next.js.

The digital collections team at the New York Public Library owns everything that’s digital and not an ebook. That includes prints, photographs, videos and audio.

It has more than a million items on it and adds from the library’s collections every day, according to Emma Mansell, a software engineer at the New York Public Library.

“We have over 54 million items in our collection and you know the saying with great collections comes great responsibility,” she joked, riffing off the famous Spider-Man quote. “We have a really small team, we have limited resources, and our priority is access, almost to the exclusion of everything else.”

There are about 80 people in the whole digital department, including product managers and designers.

Accessibility Is Priority One

The library is focused on one goal with its apps and websites: Making the digital collection accessible.

“If it takes forever for an item’s metadata to load, then it’s really difficult to do research and the site isn’t performant,” Mansell said. “If a patron is googling items that are in our collections and what we have doesn’t even come up, then you can’t really say it’s easy to find what’s in our collection.”

The digital collections website allows items to be searched and cited. It displays the items with a lot of detail and, while it can be fun just to browse the collection, it’s a serious research tool, she added.

It’s not enough to optimize the home page for accessibility. The library has to be accessible across all its websites and in every sense of the word, Mansell said. Each component on the site is individually vetted for accessibility.

Every page of every website is tailored to meet Web Content Accessibility Guidelines standards, which are part of a series of web accessibility guidelines from the World Wide Web Consortium.

“All of these websites and apps are built to create access to our collections on every level,” she said. “Our tech needs to support a kindergartner reading their first book, as much as it does an academic who’s here to work at one of the top research institutions in the country today.”

Library’s Stack

Under all those library apps and websites, the New York Public Library has its own open source design system called Reservoir Design System. It’s a library of extensible React components, including the hero button, and each is vetted for accessibility, she added. The goal of this system is to provide a consistent visual experience for all users across the digital world of the NYPL, Mansell said.

But some of the library’s sites couldn’t use Reservoir because they weren’t compatible with React.

The old digital collections website was built using Ruby on Rails in 2013. Even though it was performant, its look was dated and it didn’t meet the library’s accessibility standards. From the font size to the color contrast, it needed work, she said.

They wanted to update the design of the site to be more modern and more accessible, and they wanted to do it using Reservoir. That meant they needed a React framework.

The site was also deployed with AWS, a decision made before Mansell arrived due to intense security concerns libraries have after the British Library was hacked in 2023, she said.

Next.js Versus Express

The team needed a Node.js framework to work with and settled on a choice of either Express and Next.js. They picked the open source Next.js because:

  • Next.js is super lightweight and works out of the box, she said. Because the library’s digital collections team was small, they didn’t have the manpower to create elaborate custom configurations on the frontend.
  • NYPL wasn’t upgrading its backend and that was significant, Mansell said said. “Some very smart engineers with a library science degrees already had built that for us,” she said. “We’re not messing with it. We wanted to just have something that was going to click into place.”
  • Next.js also performs hybrid rendering eloquently, she noted, and NYPL also wanted to move to server-side rendering. “We wanted something that combines both approaches really nicely,” she said.
  • Finally and actually most importantly, the NYPL digital collection team had developers with experience in Next.js versions 9, 10 and 11.

“Even though Next.js has actually changed a lot since those versions, we knew it was a great place to start and that we could collaborate and share knowledge as digital collections and other sites [of] the library move towards using Next.js,” she said.

Organizing the Migration

The first challenge was migrating the Ruby on Rails app into a new Next.js app, she said. To make that more manageable across the site, they split it along URL lines, so that phase one focused on the home and about pages.

“Originally, we had a vision of saying let’s take Ruby controller functions, one to one, and map them to Next.js API routes,” she said. “We dropped that pretty quickly.”

Ruby on Rails uses a MVC pattern, or Model-View-Controller (MVC) pattern, which is a web development design pattern that’s used to separate an application’s user interface, data, and logic. However, Next.js has a different approach to data fetching.

“Next.js data fetching was totally unfamiliar,” Mansell said. “I was coming in as a developer that was mainly experienced with React, and so it was maybe easier for me to get into that, but we had a lot of developers that had been used to working at Ruby on Rails.”

A Blank Next.js Slate for the Site

The team decided to start with a blank slate. At first, the team started with Page Router, but then the App Router came out of beta. That led to the next big decision for the team: Should they switch to the relatively new App Router?

“We were on the fence because we couldn’t use App Router in the way that it was really intended; that is to say, with server components,” she said. “If you’ve been listening very carefully, you might have seen this already coming down the pike, but we had a very big obstacle to using server components, which was our very own design system.”

“We believe this is the future of web development. … We have the pieces in place in this project to use server components once our design library is ready for them.”
– Emma Mansell, software engineer, New York Public Library

The digital collections team was migrating the site in order to use all of the already-built components of the Reservoir system — but none worked server-side because the design system is built on top of Chalk UI, a CSS and JS library. It required that everything be client-side, she explained.

“We ended up essentially recreating get server-side props in the App Router for every single one of our pages,” she said. “We’re basically grabbing the data on the page component, server component and passing it immediately into a page-level component.”

The team found there are other benefits in Next 14 beyond server components. For instance, Router caching has been huge for the digital collections team, which has universal headers and footers to help with page load time. The error boundary, which existed in a previous version, saved the team a lot of work with error handling, she said. Finally, the move improved documentation for the team, which found that loading and Suspense were a lot clearer in Next 14 docs.

But there was also symbolic meaning in the Next.js decision, she added.

“We’re a nonprofit. Things move pretty slowly, and so for us, it was worth it to open up that conversation of how can we use server components?” She said. “We believe this is the future of web development. … We have the pieces in place in this project to use server components once our design library is ready for them.”

For the library, it was a huge step to even have that conversation, she added, demoing the new site.

“It’s a lot prettier, a lot cleaner,” she said. “We’re really happy with the performance as well, but accessibility has also improved.”

TRENDING STORIES
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...
Read more from Loraine Lawson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.