Expo throws a rager

Issue #213.August 14, 2023.2 Minute read.
Bytes

Today’s issue: The quirkiest JavaScript dev, the HTML arcade, and the things React has been hiding from you.

Welcome to #213.


Eyeballs logo

The Main Thing

Beam of light coming up out of a girl dancing in a nightclub

What happens at Expo, stays at Expo

Expo throws a rager

Last week’s Expo Launch Party was a lot like Diddy’s White Party — but instead of doing lines of coke with Paris Hilton and Ludacris in the Hamptons, we were all… quietly reading blog posts and occasionally checking Discord. Turn down for what, amirite??

Ok fine, it wasn’t technically much of a “party”, but we still got some cool new Expo goodies, and I didn’t wake up filled with regret the next morning 🙏.

ICYMI, here are the highlights:

  • A new useUpdates() React hook for the expo-updates module lets you get update info from any component, track the last time the app checked for an update, and check for errors that occurred during different stages of an update.

  • Expo Orbit is a new macOS menu bar app that lets you install and launch builds from EAS with one click, list and launch Android emulators and iOS simulators, and install and launch apps from local files.

  • EAS Update already lets you ship app updates directly to users in between app store releases, but they just launched percentage-based rollouts, so you can test updates on a smaller subset of your user base first.

Bottom Line: Expo has been carrying the React Native ecosystem on its back for a while now. That’s helped drive growth for their Expo Application Services (EAS) business, which has allowed them to continue pouring more resources into making Expo (and the RN ecosystem) better, which grows the EAS business, and so on.

It’s nice to know that we have at least one positive example of a sustainable way to fund OSS 🥲.

        

Sleuth logo

Our Friends
(With Benefits)

Three men hanging out of a window trying to fix an AC unit.

Maybe our team could be a little more efficient

Sleuth will show you how to set up DORA metrics for free

Measuring “developer productivity” doesn’t work (and devs hate it).

So how can you improve your team’s efficiency? With DORA metrics.

Companies like Netflix and Atlassian use them to measure and improve their efficiency, because they focus on team output and are backed by tons of research.

And Sleuth created this free, in-depth DORA metrics guide that shows how to implement them on your own team.

The guide is similar to an online course with videos and articles that cover what DORA metrics are, how to track them yourself, and how to use the data to measure your team’s speed, quality, and reliability.

Check it out. Sleuth’s content is some of the best (and most popular) stuff we feature on Bytes, and this guide takes it to the next level.


Spot the Bug logo

Spot the Bug

Sponsored by Datadog

Their Front-end Developer Kit includes a bunch of resources that cover more effective strategies for monitoring and testing your frontends.

function eventuallyFail(time) {
  setTimeout(() => {
    throw Error("Oops!")
  }, time)
}

try {
  eventuallyFail(1000)
} catch (error) {
  console.error(error.message)
}

Cool Bits logo

Cool Bits

  1. Million (the VDOM replacement for React) just launched Automatic Mode, which lets you use npm i million to automatically make your React project “up to 70% faster”, while writing your React code as normal with Next.js, RSC, Vite, Astro, etc.

  2. Zero created an easy way to integrate 3rd-party API credentials into your project. Their SDK is available for TypeScript, Rust, Python, and Go. [sponsored]

  3. Josh Collinsworth wrote Things you forgot (or never knew) because of React. I can’t believe Dan Abramov has been hiding all of this from us for so long.

  4. Deno v1.36 comes with more flexible security options, new testing options, and better Node compatibility.

  5. playhtml is a new library that enables interactive capabilities with minimal code and maximal expressiveness by handling real-time syncing, persistence, and reactivity. It’s also the name of a new, HTML-themed arcade I’ve invested in. The kids are gonna love it.

  6. Phil Booth wrote an article called Four ways to shoot yourself in the foot with Redis, and I’m impressed that he was able to narrow it down to only four.

  7. Onboard helps you quickly navigate and understand any large codebase through AI chat. Drop in a Github link and in minutes you can start chatting with any repo to locate functionality, understand different parts, and generate code from the repo. [sponsored]

  8. SQLedge uses Postgres logical replication to stream the changes in a source Postgres database to a SQLite database that can run on the edge.

  9. Alvar Lagerlöf wrote an article called Devtools for React Server Components, which explores how RSCs are represented over the network and how Alvar is using that to create devtools.

  10. jsisweird.com is a quiz that gives you 25 “quirky expressions” to see if you can guess the output. If you get all 25 right, you win the Zooey Deschanel award for “Quirkiest JS Dev most likely to sing in an indie band, wear colorful dresses in a popular 2010s sitcom, and eventually start dating one of the Property Brothers.”


Spot the Bug logo

Spot the Bug: Solution

Sponsored by Datadog

function eventuallyFail (time) {
  setTimeout(() => {
    throw Error("Oops!")
  }, time)
}

try {
  eventuallyFail(1000)
} catch (error) {
  console.error(error.message)
}

try/catch is synchronous. By the time our error is thrown, the try/catch block will be long gone - leaving us with Uncaught Error: Oops!. To fix this, we want to rely on promises which allow us more async control.

function eventuallyFail (time) {
  return new Promise((res, rej) => {
    setTimeout(() => {
      rej(Error("Oops!"))
    }, time)
  })
}

eventuallyFail(1000)
  .catch((reason) => console.error(reason.message))