Menu

Migrating Grep from Create React App to Next.js
📰
0

Migrating Grep from Create React App to Next.js

Vercel News·Ethan Niser·4 days ago
#kmFvSbgf
#vercel#search#client#react#query#next
Reading 0:00
15s threshold

Grep is extremely fast code search. You can search over a million repositories for specific code snippets, files, or paths. Search results need to appear instantly without loading spinners. Originally built with Create React App (CRA) as a fully client-rendered Single-Page App (SPA), Grep was fast—but with CRA now deprecated , we wanted to update the codebase to make it even faster and easier to maintain going forward. Here's how we migrated Grep to Next.js—keeping the interactivity of a SPA, but with the performance improvements from React Server Components. Link to heading Why Next.js and React Server Components? Traditional SPAs can navigate between pages quickly. However, this comes at the expense of a larger client-side JavaScript bundle needed to be fetched and parsed before the page is interactive. We wanted the fastest possible initial page load, while also keeping quick navigations between subsequent pages. Next.js can prerender the majority of the page for predictable and fast initial loads.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More