π¨ #181: React errors, Fast JSX, Flow, React-Query, Jotai, Inline styles, RSC, Next.js, RTL, RN 3D, Orbit, Gesture Handler, Skia, NewArch Helper, TC39, ESLint, VSCode...
Hi everyone!
This week I found many React Core PRs to look at. Too many, in fact, so I've saved a few for next week!
After 2D with Skia, it's super excitings to see React Native devs exploring the 3D space!
π‘ Check this newsletter on Twitter - visual format π¨
As always, thanks for supporting us on your favorite platform:
- π¦ Bluesky
- βοΈ X / Twitter
- π LinkedIn
- π½ Reddit
Don't miss the next email!
πΈ Sponsorβ
In-App Subscriptions Made Easy
RevenueCat gives you everything you need to monetize, analyze, and grow your app business. Effortlessly control customer access and entitlements, manage data, and experiment with pricing. See why over 30,000 apps trust RevenueCat to power their in-app purchase infrastructure.
βοΈ Reactβ
React Docs - Add onCaughtError / onUncaughtError, improve onRecoverableError
Recently, the React core team overhauled the way errors are handled in React 19. Those improvements are available in React 19 canary releases and should probably land in Next.js 14.2+ sooner or later. This notably includes new public API callbacks available on the React Root (createRoot
, hydrateRoot
):
onCaughtError
π reports errors caught by error boundariesonUncaughtError
π reports uncaught errors (duh)onRecoverableError
now uses the ES Error Cause feature to report the original cause
The linked PR is the WIP documentation for those new APIs, including many interactive examples. The main motivation seems to be presenting an error dialog to the user.
What excited me most in all this is that it's the first time I'm able to see in action the brand-new React hydration error message displayed in a dialog, as shown in the screenshot above. This will greatly improve the DX of React!
- πΈ Get drop-in authentication for your React app using Clerk, with ready-to-use components, hooks, and helpers.
- π React Core - Fast JSX: Don't clone props object: Creating JSX elements under React 19 should become much faster. Recent changes in how key/refs are handled make it possible to avoid cloning props. We create a lot of JSX nodes so this should have a significant impact!
- π React Core - Remove defaultProps support (except for classes)
- π React Core - Rename SECRET INTERNALS
- π¦ TIL React can render promises and contexts as JSX nodes
- π TanStack Query - new Render Optimizations guide: Itβs nice that React Query uses structural sharing under the hood, and try hard to preserve object identities over time.
- π Docusaurus has overtaken Gatsbyβs npm downloads: It feels surreal that the framework I work on is now the 2nd most used React web framework just after Next.js (far behind), despite its focus on content-centric websites. This should not last though: Astro, Remix, and Expo Web have more potential to grow.
- π React Summit - π³π± Amsterdam - 14-18 June - Get a 10% discount with code "TWIR".
- π React Connection - 22 April + React-Native Connection - 23 April - π«π· Paris - 2 days of web/mobile conferences. Get a -20% discount with code "TWIR".
- π New Flow Language Features for React: Meta engineers use Flow (and not TypeScript). This post presents the benefits of new keywords
component
,hook
, andrenders
keywords introduced directly into the language, and presents great benefits in terms of DX, type-safety, and static analysis in general. I wish we had those in TypeScript too, but since itβs specific to React itβs unlikely to happen unless benefiting the whole JS ecosystem. - π Are Inline Styles Faster than CSS?: Daniel implemented his personal React website in 3 variants and measured several things: HTML/JS size, compression, Web Vitalsβ¦ Surprisingly, using plain inline styles outperforms other CSS techniques!
- π Exploring using Suspense with React Query: Nicely explains how you can improve the UX when using React Query. Creates a
useSuspenseQueryDeferred
to avoid showing a Suspense fallback on query key changes. - π React Server Components in a Nutshell: Paul takes Waku to illustrate how RSCs enable convenient server-side requests at the component level, while former solutions only supported route level. He also makes an interesting comparison between Gatsbyβs static queries and RSCs.
- π Jotai Tips: Daishi aggregated 20 Jotai tips in a single article.
- π State machines in React: Implements a wizard flow by building a state machine from scratch.
- π Server-only Code in Next.js App Router: Use server-only and client-only packages to ensure code runs where it should.
- π Next.js Forms with Server Actions: A tutorial using Radix Form (in preview) to implement form elements compatible with Server Actions.
- π Exploring Server Actions with Next.js: A Tutorial showing how to do each CRUD operation.
- π Techniques for Fetching Data - Comparing Next.js, Remix, and RedwoodJS: Revisits old data fetching techniques to explain why RSC is better.
- π React 19 - Part 1: The Backstory; My journey writing a framework from scratch!
- π Synchronize Backend and Frontend Types With tRPC
- π¦ Jotai Effect 1.0 - A JΕtai utility package for reactive side-effects
- π¦ Jotai 2.8 - atomWithLazy, experimental store
- π¦ react-testing-library 15.0 - requires Node 18, supports new WAI-ARIA 1.2 roles
- π¦ use-signals - An experimental React hook for TC39 signals
- π₯ Jack Herrington - Declarative Routes for NextJS and React-Router: Jack introduced declarative-routing, a new typesafe routing solution heβs working on with support for React Router and Next.js. It also supports API routes, which makes it an alternative to tRPC with control over the API endpoints.
- π₯ Theo - Facebook wrote a language just for React
- π₯ James Quick - Donβt Make This Mistake with Next.js Server Components
Don't miss the next email!
πΈ Sponsorβ
Refine - Open source Retool Alternative
The sweet spot between the low code and traditional development for CRUD-heavy applications.
As an open-source React meta-framework designed for Enterprise applications, Refine offers a headless solution ideal for tasks like admin panels, dashboards, and internal tools.
While low-code tools may offer initial promise, they often fall short in handling complex scenarios due to scalability issues, limited customization options, and the risk of vendor lock-in.
Refine enables teams to rapidly develop production-ready apps while maintaining flexibility.
π± React-Nativeβ
This section is now co-authored with Benedikt
π¦ New 3D library for React Native in the works
One of the most inspiring things in the RN community is observing folks like Marc Rousavy, William Candillon and Christian Falch pushing the boundaries of whatβs possible with this technology and going far beyond rendering text and buttons on a screen. With the recent Skia announcements, we saw the state of the art regarding 2D rendering in RN. Now, Marc provided a sneak peek of some exciting advancements in 3D rendering with RN. Apparently, Margelo is working on a new library to enable access to the native Graphics APIs (Metal/Vulkan) from RN. Apart from the short demo video, I also found this thread very interesting, where Marc explains their approach using a C++ library and why they didnβt go with Three.js, which is amazing on web (React-Three-Fiber supports RN).
- πΈ React Library Analytics β Omlet helps you understand which components and props to keep, remove, or improve based on real usage data.
- π¦ VisionCamera rendering straight to Skia: This will come with Vision Camera 4, which seems to be nearing its release.
- π£ Expo - Orbit is now available as a Preview for Windows: If you donβt know Orbit yet, itβs a handy menu bar app to launch builds on Simulator.
- π£ Expo - Push notification receipt IDs will change string formats
- π Gestures in RN Gesture Handler are state machines: now the docs have an excellent interactive visualization to understand them.
- π App.js Conf - π΅π± KrakΓ³w - 22-24 May. Get a 10% discount with code "TWIR".
- π Truly Selectable Text with React Native on iOS: Everyone who has at some point in time tried to make text selectable (as in, parts of a text, not just copy a whole text element) in RN will appreciate this post and the accompanying library.
- π How To Dockerize A React Native App? Good summary of running RN dev setup in Docker. For me, the main issue remains that you canβt do iOS builds in Docker, which makes this only half as interesting, but in some scenarios it still makes sense (e.g. if you donβt run local native builds at all).
- π How to improve your React Native 3D animations: camera control with Three.js
- π Set up Detox for end-to-end testing in your React Native App
- π The Easiest Way to Build Reactive Local-First Apps with TinyBase and PowerSync
- π¦ React Native 0.74.0-rc.8
- π¦ React-Native-Skia 1.1 - makeImageSnapshotAsync
- π¦ New Architecture Helper - check if dependencies are ready for new architecture and bridgeless mode
- π¦ react-native-localize 3.1 - visionOS support
- π¦ expo-proximity - Access the system's proximity sensor
- π¦ react-native-qrcode-skia
- π₯ Simon Grimm - React Native Security: Lock Screen, Face ID & Privacy Overlay
- ποΈ RNR 293 - Real Life React Native With Benji Lightstone
- ποΈ Rocket Ship 37 - Bringing Swift to React Native with Gary Tokman
π Otherβ
- π£ Set Methods (intersection, union, difference) moved to stage 4 π
- π£ Promise.try moved to stage 2.7
- π A TC39 Proposal for Signals
- π Angular and Wiz Are Better Together
- π HTML Streaming Over the Wire - A Deep Dive
- π Creating and importing styles with constructable stylesheets and CSS module scripts
- π Enhance WASM - Backend agnostic server-side rendering (SSR) for Web Components
- π¦ ESLint 9.0 - flat config by default, config inspector, Node 20, cleanup formatters
- π¦ VS Code 1.88 - Custom editor labels, test coverage API, Copilot enhancements
- π¦ zx 8.0 - Write better scripts - smaller, sync calls, input, AbortControllerβ¦
- π₯ JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
π€ Funβ
See ya! π
Don't miss the next email!