This Week In React #203: DevTools, Next.js, Skia, Native Tabs, Godot, CodePush, void(0), Oxc, Node.js, Tauri...
Sebastien Lorber
Posted on October 3, 2024
Hi everyone!
This week we have a lot of interesting news and releases!
There's notably an important terminology change for Server Actions, and a preview of upcoming React DevTools v6.
On the React Native side we also have a broad set of interesting news and previews of exciting packages!
Also, my meme game is back. You'll understand at the end ๐
Check our partner conf React Day ๐ฉ๐ช Berlin (13 & 16 December). Get a 10% discount with our code TWIR.
๐ก Subscribe to the official newsletter to receive an email every week!
๐ธ Sponsor
Track {React} components & reduce tech debt with Omlet.
Uncover how React components are being used across your dev teams. With Omlet you get full visibility into your component library to prove your design system's business value, reduce tech debt, and track adoption across projects. Omlet helps you identify where legacy components are hiding, spot unused props, improve your component library, and simplify migrations.
Generate actionable reports in less than 5 minutes. Analyze code usage and see the impact of your design system over time.
Try Omlet for free today and maintain cleaner code: omlet.dev
โ๏ธ React
Server Actions have been renamed to Server Functions
Itโs not a code change, but itโs an impactful terminology change that is now officially published on the React v19 docs site. Server Actions are now considered a subset of a broader Server Function feature. It only becomes an action when used within:
<form action>
useActionState()
startTransition()
This change clarifies that โuse serverโ is about exposing a server endpoint, not necessarily limited to mutations. Fetching data and JSX with Server Functions might not be an anti-pattern after all.
About Next.js Server Actions: they use POST
requests and run sequentially, but this is a Next.js implementation detail and React doesnโt prevent you from running actions in parallel. The Next.js team has confirmed their intention to introduce new APIs to call Server Functions with GET
.
The React DevTools have been the focus of a lot of work recently, notably the ability to present a unified easy-to-understand React tree for Server and Client components. The browser extensions have not been published, but the v6 changelog is available with many PRs and screenshots to look at. From what I see, the team has done an incredible work to provide a great DX around element inspection, profiling, logging, stacktraces, sourcemaps.
- ๐ธ React Bricks - Transform React components into dynamic, visually editable bricks of content with the pioneering React Visual Headless CMS.
- ๐ Next.js PR - Update Dynamic APIs to be async: The PR we mentioned last week (turning APIs such as
cookies()
,headers()
andsearchParams
async) has been merged and released in Next.js 15 canary 171. Libraries might have to adjust their code accordingly (nuqs) or introduce breaking changes (Clerk). Migration instructions will be provided very soon. - ๐ Next.js PR - Add
connection()
as a new dynamic API: A new API to bail out of pre-rendering will replaceunstable_noStore()
. - ๐ฆ React Core - Lazy Context Propagation has been enabled for React 19 and React Native: This shouldnโt impact you directly, but it's an important implementation detail change that sets the stage for upcoming features to optimize React Context consumption.
- ๐ฆ React Router - Typesafety improvements preview: React Router will soon be able to generate types manually (CLI) or automatically (TS plugin) to improve type-safety.
- ๐๏ธ React-Brussels - ๐ง๐ช Brussels - 18 October - Last call! You still have a chance to get your ticket, and donโt forget the 10% discount with code "TWIR".
- ๐๏ธ React Summit US - ๐บ๐ธ New-York - 19 & 22 December - 10% discount with code TWIR. Full line-up revealed!
- ๐ Cloudflare Builder Day 2024 - 18 big updates to the Workers platform: Cloudflare made relevant announcements for React devs. They improved Node.js compatibility and added support for Static Assets. They also joined the OpenNext initiative and published a new adapter to reduce Next.js vendor lock-in and to make it more portable outside Vercel without compromises.
- ๐ Level up your env var tooling in Next.js with DMNO: This interesting tool can help prevent leaking secrets in a modern React RSC world. It also supports Remix, Astro, and Vite.
- ๐ The unspoken rules of React hooks: Some functions returned by React (such as
setState
) are known to be stable and do not need to be added to dependency arrays. This rule is implicit and thereโs no way for third-party libraries to declare their returned functions as stable. - ๐ SSR-friendly Custom React Hook for Local Storage Read and Write: Reading
localStorage
withuseSyncExternalStore
is great and helps avoid hydration mismatches. But you have to work around storage events not firing for the current document. - ๐ Intro to CSS animations for React developers: Interactive article that notably explains the problem with unmounting and animations.
- ๐ use() and data fetching: Moves data fetching from
useEffect
to an RSC, which also shows Reactโs ability to serialize promises. - ๐ Reliable date formatting in Next.js: To avoid hydration mismatches, you need to use the same Date/timestamp, timezone, and locale across both client/server environments.
next-intl
gives you APIs to help you do so. - ๐ Inverse Assertions: An interesting React Testing Library technique to assert a side effect did NT happen.
- ๐ Types of React Components: Documenting component types from 2013 to 2024.
- ๐ Proxy state management: MobX vs Valtio
- ๐ฆ React Query 5.59 - Experimental support for
use()
: When using the newexperimental_prefetchInRender
option, the library will return a stable promise that you canuse()
making it easier to integrate with React 19 Suspense in a performant way. Itโs more convenient thanusePrefetchQuery
and more parallel thanuseSuspenseQuery
which can create waterfalls. - ๐ฆ Live Compositor - React renderer for mixing real-time livestreams: A new innovative product from Software Mansion provides live video and audio mixing capabilities similar to OBS through a familiar React interface. Open-source but requires a license for production usage.
- ๐ฆ React Aria - September 30, 2024 Release - Color Pickers stable, Button pending state, Tree beta, Disclosure, DisclosureGroup (accordion)
- ๐ฆ Vaul 1.0 - Drawer component for React - Rewritten, improved, new docs
- ๐ฆ Framer-Motion 11.9 -
useAnimate()
mini, much smaller, built on top of WAAPI - ๐ฆ React-admin - October 2024 Update
- ๐ฅ Remotion on Shark Tank - Pitching a programming framework on TV: Remotion is the first React framework to pitch Shark Tank investors, and they even got an offer!
- ๐ฅ Delba - React explained: 'use client': Greatly explained, and another great usage of Remotion!
- ๐ฅ Theo - Next.js has real competition now (TanStack Start)
- ๐ฅ Jack Herrington - Legend State v3 - Local first sync and fastest React State manager
- ๐๏ธ This Month in React 2024-09 โ Async Components, a React 19 cheatsheet, Static Hermes, and trademarks drama
๐ธ Sponsor
WorkOS: Modern Identity Platform for B2B SaaS
With WorkOS you can start selling to enterprises with just a few lines of code.
๐ WorkOS AuthKit supports a complete user management solution along with SSO, SCIM, RBAC, & FGA.
๐๏ธ The APIs are flexible, easy-to-use, and modular. Pick and choose what you need and integrate in minutes.
๐จ Design and user experience are everything. From the quality of our documentation to how your users onboard, we remove all the unnecessary complexity for developers.
โจ AuthKit is free up to 1 million MAUs and includes bot protection, MFA, RBAC, & more.
๐ค WorkOS is trusted by hundreds of leading startups like Perplexity, Vercel, & Webflow.
๐ฑ React-Native
- ๐ธ React Native Mastery - The only course you need to Master React Native & Expo
- ๐ React Native PR - Migrate template to Swift: Newly initialized projects will use Swift by default starting React Native 0.77.
- ๐ React Native Proposal - Removing "run on iOS/Android" key handlers from the CLI dev server
- ๐ฆ React-Native-Godot preview: An upcoming package should allow React Native developers to create games with the Godot Engine.
- ๐ฆ React-Native-Bottom-Tabs preview: Oskar is working on a new native tabs component using SwiftUI TabView and Android BottomNavigationView. Compatible with react-native-screens, it should be an almost drop-in replacement to the JS-based one from React-Navigation. The demo highlights the difference between native/JS, particularly for the VisionOS platform.
- ๐ฆ Tzvetan Mikov - โThe Problem of Intl in Hermesโ
- ๐ Meta has rebuilt Instagram and Facebook for its Quest headsets: The announcement is not technical, but this VR experience is built with React Native and running on Static Hermes. Edit: this more technical blog post came out just before hitting publish!
- ๐ How to synchronize reactive local-first apps with TinyBase
- ๐ Simplify Your iOS Brownfield Integration With RootViewFactory
- ๐ฆ React-Native-Skia 1.4: William introduced an experimental WebGPU Canvas integration.
- ๐ฆ Code-Push-Server: Microsoft open-sourced a server implementation of CodePush before shutting down App Center to avoid disrupting apps relying on it. Note that the React Native SDK doesnโt plan to support the New Architecture although someone found a way to make it work with the Interop layer.
- ๐ฆ Expo-File-System@next: The upcoming SDK 52 version has been rewritten to be simpler and fully synchronous.
- ๐ฆ Expo-Speech-Recognition: Cross-platform speech recognition for iOS, Android and Web.
- ๐ฆ Pressto - Improve your app with pressable micro-interactions
- ๐ฆ Lottie v1.0 specification
- ๐ฆ React-Native-Gesture-Handler 2.20 - Add v0.76 and Stylus support
- ๐ฆ React-Native 0.76.0-rc.3
- ๐ฅ React Native Universe 2024 - Conf playlist
- ๐ฅ Reactiive - Animated Loader with Skia
- ๐ฅ Danโs Lab - Add Computer Vision to your Expo iOS App using Skia (Golf Swing Tracer)
- ๐ฅ Simon Grimm - 10 Essential React Native Tips Every Developer Must Know
- ๐๏ธ RNR 309 - React Native IDE with Krzysztof Magiera
๐ Other
- ๐จ ECMAScript News - My favorite newsletter to keep up with ES, TC39, JS tooling, and runtimes
- ๐ฃ Announcing VoidZero - Next Generation Toolchain for JavaScript: Evan You announced
void(0)
, a VC-backed company to support the development of an ambitious superfast JS toolchain including Vite, Vitest, Rolldown, Oxc. Those projects will remain free under the MIT license. - ๐ Node.js PR - unflag require(esm) for v23: Good news for Node.js CJS/ESM interop. This is planned to be backported in older LTS.
- ๐ Web Components Are Not the Future: Thereโs a Web Component drama going on right now and youโll find many thought leaders giving their opinion.
- ๐ Whatโs the Difference Between HTMLโs Dialog Element and Popovers?
- ๐ฆ Oxc Transformer Alpha - Transpile 5x faster than SWC
- ๐ฆ Tauri 2.0
๐คญ Fun
See ya! ๐
Posted on October 3, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 28, 2024
November 18, 2024