Skip to content

2.0 migration#103

Merged
thejessewinton merged 17 commits intomainfrom
2.0-app-dir
Jan 10, 2024
Merged

2.0 migration#103
thejessewinton merged 17 commits intomainfrom
2.0-app-dir

Conversation

@thejessewinton
Copy link
Copy Markdown
Contributor

@thejessewinton thejessewinton commented Dec 7, 2023

A full rewrite of Beam!

Context

We knew that we wanted to update Beam to improve performance, and update it to use more current implementations of the tools that it's built on. This release, what should be formally seen as a 2.0 does that.

App Directory

The first big change is the use of Next 14 and the app directory. Since migrating our marketing site to take advantage of the newest versions of React and Next, there have been significant benefits, not only to performance, but also to DX. When taking a top-down rewrite into account, I wanted to bring those benefits over to Beam. This new version takes full advantage of it, statically rendering the first page of posts on the index, and dynamically rendering paginated posts after. Initial load times for all pages and posts are almost instant.

tRPC

We're still using tRPC across the app, but we use the new server-side utilities to fetch data, and then use the old useMutation hook to mutate it. We're using the new tRPC apis, released in version 10, which offer better performance, and more clarity when developing. Another DX win.

cmdk & Radix

Radix replaces Headless UI across the app; we were using Radix for a few components already, so in this new implementation, Radix replaces any implementation that was previously using Headless UI! At the same time, cmdk is brought into the search dialog to replace the custom solution that had been used before, giving us an accessible, user-friendly search menu.

SVGO

To manage SVG icons, we're now using a simple implementation of the SVGO command line tool. When you want to add a new icon to the app, add the svg to src/svg and run:

pnpm generate:svg

The newly generated SVG component will be output to src/app/_svg, and is ready to use.

Please feel free to discuss below, and provide any feedback on the changes; they're extensive, but a top-down rewrite is going to be!

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
beam ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2024 5:12pm

@thejessewinton thejessewinton marked this pull request as ready for review January 10, 2024 17:10
Copy link
Copy Markdown

@skullface skullface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dq82beop9rra1

@thejessewinton thejessewinton merged commit ba7d1f1 into main Jan 10, 2024
@thejessewinton thejessewinton deleted the 2.0-app-dir branch January 10, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants