Astro amps it up

Issue #194.June 8, 2023.2 Minute read.
Bytes

Today’s issue: Being old enough to remember Boy Meets World, blogging on GitHub, and combining React with Python Key Lime Pie.

Welcome to #194.


Eyeballs logo

The Main Thing

Guy in longsleeve shirt ziplining into a swimming pool

He's just too rough on the rope.

Astro amps it up

It’s officially summertime, which means the Astro team is working extra hard to help us all trim down our JS bundle sizes so our sites can finally feel confident enough to take off their long-sleeve shirts in the pool.

In just the past month, Astro has released three minor updates, a new image optimization experience, and a new doc site builder called Starlight (Muse approves). Here are a few highlights:

  • Middleware lets you run code before or after the page is rendered and returned to the user, which provides greater functionality for auth, redirects, and more. It’s now stable as of Tuesday’s v2.6 release.

  • Hybrid Rendering also became stable in v2.6, and is designed to give you the best parts of static and dynamic. Setting output: "hybrid" lets you mix interactive pages and API endpoints into your site, but each page still defaults to static pre-rendering.

  • Assets is a new (still experimental) set of features for optimizing images and other files. It comes with a much more powerful <Image /> component, an Image Service API to easily connect with external services like Vercel or Cloudinary, and complete support for Markdown, MDX, and Markdoc.

Bottom Line: We built two different things with Astro recently, and we loved how “The Tony Perkis of JavaScript” helped us effortlessly get a solid Lighthouse score (so those Google DevRels don’t get mad at us on Twitter). And we’re not the only ones — Astro’s weekly downloads have grown 10x in the last year, and they don’t show any signs of slowing down.

        

FusionAuth Logo

Our Friends
(With Benefits)

A skeleton admiring the clothes of medieval person

"You built all of this in an hour? Incredible."

FusionAuth is the holy grail

Trying to build authentication from scratch is like trying to hold in diarrhea while meeting your future in-laws — it’s painful, complicated, and you’re one wrong step away from a complete disaster.

That’s why we’re huge fans of FusionAuth.

They’re a complete auth solution that takes care of all the gross stuff like SSO, MFA, WebAuthn, user management, and security — and if you don’t know what one or more of these things are… you probably need it.

Their Free Community version is surprisingly robust (no credit card, no limits, and it’s free forever if you self host 🙏). That makes it great to learn with or use for side projects, but it also has a pretty seamless integration process for existing apps.

And if you ever get stuck, premium users can call their support line and talk to an actual engineer who really knows auth — instead of just typing your questions into a support chat box that no one will read (like some other auth companies I know).

Check it out and never worry about auth again.


Tip logo

The Tip

Sponsored by Secureframe

You can get your app SOC 2 compliant in weeks instead of months, with their fully automated process. Check out the free, personalized demo today.

Sometimes you need to remove a key/value from an object. Using the power of JavaScript™ (and ES6’s rest operator), you can accomplish that with something like this.

const user = {
  name: 'Tyler',
  age: 30,
  date: 1614619969641,
  funny: true
}

const { funny, ...updatedUser } = user

console.log(updatedUser) // {name: "Tyler", age: 30, date: 1614619969641}

Cool Bits logo

Cool Bits

  1. Dan Abramov wrote a technical deep dive on Building a simplified version of RSC from scratch. And he did it in the most “I’M HIM” way, in a GitHub Discussions post.

  2. Felix Raab wrote an insightful piece about How the Raycast API and extensions work.

  3. PostHog’s Session Replays tool is the best way to watch your users in action and make improvements based on what you see. And it’s stupid easy (and free) to try it out. [sponsored]

  4. ReactPy is a library that I assume combines two of my favorite things: React and Key Lime Pie.

  5. Hunter Johnston created shadcn-svelte, an unofficial Svelte port of the popular component library. It’s kind of like all the unofficial fan art I’ve been drawing of The Driving Crooner lately. (Yes, I’ve been watching a lot of I Think You Should Leave.)

  6. Jeremy Wagner from the Chrome team wrote about How large DOM sizes affect interactivity, and what you can do about it. Remember: Only YOU can prevent large DOM sizes.

  7. François Zaninotto wrote Is React Having An Angular.js Moment? The answer is probably no, but it’s an interesting piece.

  8. Frontend Mastery wrote about The evolution of React APIs and code reuse. It’ll be a nice walk down memory lane if you’re someone who’s old enough to remember watching Boy Meets World. If not, you’ll probably learn something new from the article — but you’ll learn even more about love and friendship if you go back and watch all 7 seasons of Corey, Topanga, and Shawn.