Bytes: React Query is single and ready to mingle

Bytes banner (Turn on images 😘)

This week we’ve got open source rebrands, dinosaurs that aren’t extinct anymore, and a new film from the Jordan Peele of Web Dev.

Welcome to #111.


Michael Scott as Date Mike

Hi, I'm TanStack. Nice to meet me.

The Artist Formerly known as React Query

When you’re the most popular data fetching library in the React ecosystem, it’s tempting to get complacent – but the RQ team is not about that life.

They pushed the boundaries again last week when they released React Query v4 and revealed some big news: they’re officially single and ready to mingle (with the rest of the JS ecosystem).

That’s a tastefully euphemistic way of saying that React Query is now framework agnostic, with “adapters” for each specific JS framework. They’ve already got a built-in React adapter, and adapters for Vue, Solid, and Svelte are in the works.

And to prove they’re not playing favorites, they changed their name from React Query to TanStack Query – kind of like when Prince changed their name to ÆŹÌ”ÌŹÌŠ and became a legend forever (even if it created a little lot of confusion at first).

In addition to getting developers to unironically say “TanStack” in daily life, the technical improvements in v4 are impressive.

  • Offline support: In v4, Query no longer assumes an active network connection and works for any type of async data – and it has a Network mode that lets you develop offline first.

  • Performance improvements: Tracked queries help optimize renders and gives you a nice performance boost.

  • Persistence: You now have a lot more control over where you are storing data, and things like local storage work out of the box.

  • First class React 18 support: TanStack Query might be framework agnostic, but it hasn’t forgotten about its first love. The React adapter now uses useSyncExternalStore to ensure compatibility with concurrent mode.

Bottom Line: With this release, TanStack Query seems like the ideal solution for handling async data for just about any front-end application. We like it so much that we made a full course about it if you want to give us your money đŸ€‘.


Ross from friends with text saying humor based on my pain.

Laughing about building notifications so we don't cry [sponsored]

Courier gave my team so much time for activities

Newton’s 3rd law of motion clearly states that, “building app notifications always takes 5x longer than you think.”

And that might be understating it now that we have so many different platforms to worry about (email, SMS, web and mobile push, Slack, and tons more).

That’s what makes Courier so amazing. They give you complete notification infrastructure with one API that you can set up in an afternoon.

That API integrates with over 50 notification channels, and it handles everything – templating, routing, automations, even logging and analytics. It’s your PM’s *wildest* dream come true.

Courier is used by Fortune 500 companies and startups like Lattice and LaunchDarkly to save an average of 480 engineering hours a year. That’s a lot more time for hide and go seek Fridays team building.

The best part? Courier lets you send your first 10,000 notifications of every month for free (no credit card required).

Check it out. 👈


Barney emerging from the woods

Docusaurus v2 emerging from its 3-year alpha/beta period

Doc shop talk

It’s taken 4 years, 75 alphas, and 22 betas, but it’s finally here.

No, we’re not talking about React 18 (for once). We’re talking about Docusaurus – another Meta-backed open source project that just launched v2 of its static site generator for building documentation sites.

How we got here: The hardest part of creating a doc site is obviously *writing* good docs. But back in 2017, developers at “the artist formerly known as Facebook” realized there might be a better approach to building the actual websites than just copy-pasting the same Jekyll template over and over again.

So they built their own SSG with a unique value prop – get your doc site online in 10 minutes so you can focus on writing the content (with Markdown), but provide enough flexibility to go back later and truly customize it with your own branding, design, and features (with React).

Fast forward a few years, and Docusaurus is probably a lot more popular than you think, even when compared to more “all-purpose” React frameworks.

What’s new in v2:

  • React is now used on the client (not just the server like v1), which enables a more modern navigation

  • MDX support, so you can create interactive React components in your docs

  • More theming flexibility and a new system of plugins make customization a lot easier

Bottom Line: Docusaurus v2 just went live on ProductHunt – so go show them some love with an upvote, so that something besides a Chrome extension that steals an ungodly amount of personal data can win product of the day for once.


JS Tip – Sponsored by FusionAuth

This is a complete auth solution that just works. Check out their free community version to see why it’s got over 10 million downloads.

How can we improve this code?

async function completeCheckout(orderId) {
  await updateAnalytics(orderId);
  const order = await processOrder(orderId);

  return order;
}

Cool Bits

  1. Bartek IwaƄczuk (from the Deno team) wrote about How to roll your own JavaScript runtime. Reminds me a lot of when my dad taught me how to roll my own cigarettes. Man, sometimes I really miss the fourth grade.

  2. Adam Argyle made a 30-minute GUI Challenge video on building Carousels in CSS. And if he makes a few more short horror films like that, he’ll have earned a new official job title at Google – The Jordan Peele of Web Dev.

  3. CarbonQA provides QA services geared for dev teams. They’ll boost your team’s morale sky-high by
 breaking your code repeatedly. But the good news is that you’ll never have to waste time on testing again. They work in your tools, talk with your team on Slack, and let your devs be devs 🙏 [sponsored]

  4. Blueboat is a new, serverless JS runtime with enhancements for data-intensive applications that clearly was very inspired by Bartek’s article (that’s a joke). Can’t tell if we’re living through the runtime renaissance or the runtime dark ages right now, but at this pace we’ll have more runtimes than websites soon (math checks out).

  5. Apoorv Goyal wrote about what it’s like building an app with ChiselStrike – a new, modern take on BaaS.

  6. Michael Lynch wrote about how he regrets his $46k website redesign and provided some valuable insight on working with contractors and agencies. But hey, at least he didn’t pay a consulting firm $32 Million for a website that never even went live like Hertz did. Gotta find that silver lining somewhere.

  7. GrafBase is an edge-native data platform that gives you instant serverless GraphQL backends. Ok, but why do they call it GrafBase tho? I don’t get it.]

  8. The Liveblocks team wrote about how they built undo/redo for a multiplayer environment – a process they describe as “notoriously tough” and “fraught with difficulty.” Sounds a lot like the job of trying to manage the Sleezer Tour back in 2000, which would’ve been co-headlined by the two most influential bands of the 21st Century. “Fraught with difficulty” indeed.


JS Tip – Sponsored by FusionAuth

How can we improve this code?

async function completeCheckout(orderId) {
  await updateAnalytics(orderId);
  const order = await processOrder(orderId);

  return order;
}

Because processOrder doesn’t depend on the result of updateAnalytics, we can parallelize the two invocations.

async function completeCheckout(orderId) {
  const [_, order] = await Promise.all([
    updateAnalytics(orderId),
    processOrder(orderId)
  ])

  return order;
}

Share Bytes

ui.dev banner
 

We work hard to make Bytes something you'd want to share with your developer friends. And to make it a little easier, we'll give you free stuff when you do.

30

Your bits

Your Referral Page

Your shareable link

https://bytes.dev?x=1697807915
 

Have a product you think our developers will love?
Advertise in Bytes

youtube icon youtube icon twitter icon instagram icon

50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101

Unsubscribe from Bytes

Older messages

Bytes: C++ kind of sucks, actually

Monday, July 25, 2022

This week, we've got Google's succession plans, Bun tattoos, and my virtual wolfpack chatroom from 2005. Welcome to #110. Live footage of the C++ succession ceremony Google wants to build the

Bytes: what exactly are the differences between JSC and V8?

Monday, July 18, 2022

This week, we've got robots, engines, and minions. Welcome to #109. When you finally give GitHub Copilot your credit card Love, Death & (Coding) Robots Last year, GitHub introduced us all to

Bytes: Sun's Out Bun's Out

Monday, July 11, 2022

As a reminder for all our cultured readers, today is National Slurpee Day so make sure you take advantage. This week, we've got hot cross buns, a new Shrek getting chosen, and how to apply The

Bytes: Like any good doggo, ESLint might be a little overbearing

Monday, July 4, 2022

Happy Fourth of July to those who celebrate and happy July 4th to those who don't. This week, we've got our special Bytes Cocktail recipe, our class action lawsuit Airbnb developers, and a

Bytes: Hot Spec Summer is BACK

Monday, June 27, 2022

This week, we've got Hot Spec Summer, Shopify's Big H, and Bionicles fan fiction. Welcome to #106. Hot Spec Summer is back A tradition unlike any other Last week, we observed the only religious

You Might Also Like

SWLW #592: Advice that I can't get out of my head, The Compass vs. Map method, and more

Friday, March 29, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

ASP.NET Core News - 03/29/2024

Friday, March 29, 2024

View this email in your browser Get ready for this weeks best blog posts about ASP.NET Core! This newsletter is sponsored by elmah.io - the most advanced, yet so simple to set up, error logging and

New Linux Bug Could Lead to User Password Leaks and Clipboard Hijacking

Friday, March 29, 2024

THN Daily Updates Newsletter cover Refactoring in Java ($36.99 Value) FREE for a Limited Time Refactoring in Java serves as an indispensable guide to enhancing your codebase's quality and

Post from Syncfusion Blogs on 03/29/2024

Friday, March 29, 2024

New blogs from Syncfusion Introducing the New .NET MAUI Chat Control By Piruthiviraj Malaimelraj This blog explains the features of the new Syncfusion .NET MAUI Chat control added in the 2024 Volume 1

Re: Last Chance

Friday, March 29, 2024

Dear there, By this time tomorrow, your exclusive new subscriber discount will be gone and you'll have to pay twice as much to join Insider and master everything your iPhone has to offer. If, like

Hacker Newsletter #694

Friday, March 29, 2024

Always forgive your enemies - nothing annoys them so much. //Oscar Wilde hackernewsletter Issue #694 // 2024-03-29 // View in your browser Happy Easter if you celebrate it! Heads up - we're taking

Apple RCS 📱, SBF's 25 year sentence 👮, Linux Foundation's Redis fork 👨‍💻

Friday, March 29, 2024

RCS is coming to the iPhone in the fall of 2024 Sign Up|Advertise|View Online TLDR Together With Veracode TLDR 2024-03-29 Build fast, build secure (Sponsor) Software is drowning in security debt.

Data Science Weekly - Issue 540

Friday, March 29, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

This Week in Rust #540

Friday, March 29, 2024

Email isn't displaying correctly? Read this e-mail on the Web This Week in Rust issue 540 — 27 MAR 2024 Hello and welcome to another issue of This Week in Rust! Rust is a programming language

The Value Of A Promise 🤞

Friday, March 29, 2024

How much is a promise from a tech company really worth, anyway? Here's a version for your browser. Hunting for the end of the long tail • March 28, 2024 The Value Of A Promise When you hear a