This Week In React #188 : React 19 RC0, Data Fetching, Framer Motion, Compiler, Astro, Zod, Remix, Docusaurus, React-Query...
Tags: react, reactnative
Published: 2024-06-07 15:17:14

---
series: This Week In React
canonical_url: https://thisweekinreact.com/newsletter/188
---

Hey,

This is [Benedikt](https://twitter.com/bndkt) this week, filling in for Sébastien who’s taking a newsletter break.

React 19 is nearing its final release, with the first RC published this week. Apart from this, there’s not a lot of release activity in the React and React Native communities. So this week, I decided to feature two great pieces of content as headlines in both sections. A seminal 10k-word-long article about Data Fetching Patterns in Single-Page Applications by Juntao Qiu, and a great video overview of all the different ways to build React Native apps with Expo by Simon Grimm.

I wanted to use this opportunity to let you know that both Sébastien and I put a lot of effort into finding the best content for the React and React Native sections, but I’m sure there is still great stuff that sometimes goes unnoticed. That’s why we’re always open to suggestions, so feel free to let us know when you put something out there!


---

💡 Subscribe to the [official newsletter](https://thisweekinreact.com?utm_source=dev_crosspost) to receive an email every week!

[![banner](https://thisweekinreact.com/img/TWIR_POST.png)](https://thisweekinreact.com?utm_source=dev_crosspost)

---

## 💸 Sponsor

[![Build your product skills](https://thisweekinreact.com/emails/issues/183/posthog.jpg)](https://newsletter.posthog.com/?utm_source=twir&utm_campaign=twir)

**[Build your product skills](https://newsletter.posthog.com/?utm_source=twir&utm_campaign=twir)**

[**Product for Engineers**](https://newsletter.posthog.com/?utm_source=twir&utm_campaign=twir) is PostHog’s newsletter dedicated to helping engineers improve their product skills. Learn what questions to ask users, how to build new features users love, and the path to product market fit.

[**Subscribe for free**](https://newsletter.posthog.com/?utm_source=twir&utm_campaign=twir) to get curated advice on building great products, lessons (and mistakes) from building PostHog, and deep dives into the strategies of top startups.

---

## ⚛️ React

📜 **[Data Fetching Patterns in Single-Page Applications](https://martinfowler.com/articles/data-fetch-spa.html)**

This is a long read (~10k words), but such a great article! The title doesn’t do its justice, because in passing, this covers so much more than just data fetching. Basic React concepts, Suspense, async state handling, code splitting, prefetching, and parallel data fetching to avoid waterfalls. There has been a lot of discussion on X about web app performance in the last few weeks (Rails vs. React, MS Edge decision, …) - this is a great article to freshen up the basics of this topic to build a great user experience!

- 💸 [Meilisearch - Build search as you type for React](https://www.meilisearch.com/with/react?utm_campaign=sponsoring&utm_source=thisweekinreact)
- 👀 [React Router PR - defineRoute API](https://github.com/remix-run/react-router/pull/11596)
- 🐦 [shadcn/ui is working on adding charts](https://x.com/shadcn/status/1795920488797188525)
- 🐦 [Remix working inside a Cloudflare Durable Object 🤯](https://x.com/threepointone/status/1796223745243119890)
- 🐦 [React 19.0.0-rc.0](https://x.com/acdlite/status/1797668537349328923): Andrew Clark says “This is the exact build we'll release as 19.0, unless an issue is reported that requires a breaking change.”
- 🐦 [Upcoming Spline (3D rendering) and NextJS RSC integration](https://x.com/rauchg/status/1798021886657650711)
- 📜 [I tried React Compiler today, and guess what …](https://www.developerway.com/posts/i-tried-react-compiler): A super interesting and detailed article about React Compiler and real-world use cases. Seems like we’re not at the point yet where we can just ignore everything about memoization because the Compiler takes care of it, and apart from this conclusion the article is also a great reminder of how memoization works exactly.
- 📜 [Do you still need Framer Motion?](https://motion.dev/blog/do-you-still-need-framer-motion): The creator of the popular React animation library explains you might not need his library anymore thanks to 5 great new/upcoming CSS features.
- 📜 [Sneaky React Memory Leaks II: Closures Vs. React Query](https://schiener.io/2024-05-29/react-query-leaks): This follows up on last week's great article. This time it shows how React Query might be affected as well by memory leaks, and how to fix them. Using custom hooks looks like a good general solution to this problem.
- 📜 [An even faster Microsoft Edge](https://blogs.windows.com/msedgedev/2024/05/28/an-even-faster-microsoft-edge/): Microsoft was using React for some elements of the UI in its Edge browser and is now abandoning this approach. See the video linked below for more context.
- 📜 [Speeding up the JavaScript ecosystem - Server Side JSX](https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-9/): The JSX runtime of React can lead to many object allocations. Marvin (Preact/Deno) shows it's possible to precompile JSX to improve server rendering of JSX and reduce GC. Maybe React could use that as well?
- 📜 [Type-safe module mocking in Storybook](https://storybook.js.org/blog/type-safe-module-mocking/): Very elegant way to leverage subpath imports for module mocking.
- 📜 [Multiple action handlers with Zod in Remix](https://www.jacobparis.com/content/zod-actions-remix): If you target one action endpoint from multiple components, this article shows you how to combine the different Zod schemas via discriminated union.
- 📜 [Embracing Slow Networks: Improving User Experience](https://www.epicweb.dev/embracing-slow-networks-improving-user-experience)
- 📜 [Cleaner components with useSuspenseQuery](https://swizec.com/blog/cleaner-components-with-use-suspense-query/) & [Why useSuspenseQuery works](https://swizec.com/blog/why-use-suspense-query-works/)
- 📜 [Explore new hooks coming up in React 19](https://blog.saeloun.com/2024/06/05/new-hooks-in-react-19/)
- 📦 [React 19.0.0-rc.0](https://www.npmjs.com/package/react/v/19.0.0-rc.0): Andrew Clark said "This is the exact build we'll release as 19.0, unless an issue is reported that requires a breaking change."
- 📦 [Docusaurus 3.4](https://docusaurus.io/blog/releases/3.4): A new way to centrally manage tags (great for consistency), an experimental hash router (great for offline browsing without a web server), and an option to use namespaces for local storage (useful if you’re deploying multiple instances of Docusaurus on the same domain).
- 🎙 [This Month in React, May 2024 - Updates from React Conf](https://www.reactiflux.com/transcripts/tmir-2024-05)
- 🎥 [Jack Herrington - Beware of "auto" Mode in the NextJS App Router](https://www.youtube.com/watch?v=bU3Px8bHjPA)
- 🎥 [Theo - Microsoft Regrets Using React (For Edge)](https://www.youtube.com/watch?v=Bm8Ga07BOnI)
- 🎥 [Stephanie Dietz - How to Use React's `useOptimistic` Hook](https://www.youtube.com/watch?v=ChF9-P4Bjs4)
- 🎥 [UI Engineering - Why 95% of Modals should be Local (in React)](https://www.youtube.com/watch?v=iMoAviG_ZUE)
- 🎥 [Aaron Francis - Laravel vs React](https://www.youtube.com/watch?v=gRtv-BVkwA4)
- 🎥 [Theo - How React Query Won](https://www.youtube.com/watch?v=xIflplz925Y)

---

## 💸 Sponsor

[![WorkOS: enterprise-grade auth in minutes](https://thisweekinreact.com/emails/issues/188/workOS.jpg)](https://workos.com/?utm_source=thisweekinreact&utm_medium=newsletter&utm_campaign=q22024)

**[WorkOS: enterprise-grade auth in minutes](https://workos.com/?utm_source=thisweekinreact&utm_medium=newsletter&utm_campaign=q22024)**

🔐 WorkOS supports a complete User Management solution along with **SSO, SCIM, RBAC, & FGA**.

🗂️ Unlike other auth providers that rely on user-centric models, WorkOS is designed for B2B SaaS with an **org modeling approach**.

🏗️ The APIs are **flexible, easy-to-use, and modular**. Pick and choose what you need and integrate in minutes.

✨ User Management is **free up to 1 million MAUs** and includes bot protection, impersonation, MFA, & more.

🤝 WorkOS is trusted by hundreds of leading startups like **Perplexity**, **Vercel**, & **Webflow**.

Future-proof your auth stack with [WorkOS](https://workos.com/?utm_source=thisweekinreact&utm_medium=newsletter&utm_campaign=q22024) 🚀

---

## 📱 React-Native

![Simon Grimm: Build React Native with Expo](https://thisweekinreact.com/emails/issues/188/rn188.jpg)

🎥 **[Every Way to Build your React Native App with Expo](https://www.youtube.com/watch?v=cs-zgHjt5RQ)**

Many roads lead to Rome, and it seems there are almost as many ways to build an Expo app. This gives us developers a lot of power and freedom, but can also sometimes lead to confusion - not just for beginners! Thankfully, Simon made a great video comparing the different approaches via Expo Go, Expo Prebuild, Xcode, Android Studio, and EAS. This is also a great opportunity to congratulate Expo on reaching [30k stars on GitHub!](https://x.com/expo/status/1796262781584654492)

- 💸 [React Native Mastery - The only course you need to Master React Native & Expo](https://notjust.dev/react-native-mastery?utm_source=twir&utm_medium=email)
- 🐦 [The most powerful demo AI app, featuring RSC via Expo Router](https://x.com/Baconbrix/status/1795804445738963283): We’ve talked about Evan Bacon’s RSC demo before. This is a great thread on X summing up the promise and including a nice comparison video on how great mobile UI can get especially in the context of LLM chat apps.
- 📜 [React Native Security Guide](https://ospfranco.com/react-native-security-guide/): Oscar picks up a topic that doesn’t get talked about enough. This is a good intro, covering secrets (TLDR: Don’t store them on a device) and encryption of user data (including leveraging biometrics).
- 📜 [Seamless Transitions: From Native to React Native](https://commerce.nearform.com/blog/2024/seamless-transitions-from-native-to-react-native): Some impulses for brownfield development: Because RN creates truly native apps, introducing RN to an existing app or migrating to RN can be made seamless for the end users.
- 📦 [React Native 0.74.2](https://github.com/facebook/react-native/releases/tag/v0.74.2): Patch release, bumping some dependencies (typescript-eslint, CLI) and fixing bugs.
- 📦 [React Native Reanimated 3.12.0](https://github.com/software-mansion/react-native-reanimated/releases/tag/3.12.0): Introduces a new hook useComposedEventHandler which simplifies merging of multiple event handlers.
- 🎙️ [RNR 298 - Create Expo Stack, NativeWind Ul, & Plugin Pro with Dan Stepanov](https://reactnativeradio.com/episodes/rnr-298-create-expo-stack-nativewind-ul-plugin-pro-with-dan-stepanov)
- 🎥 [Rocket Ship 42 - React Native is alive! App.js Recap with Áron Berezkin](https://www.youtube.com/watch?v=GeUfrojkoo0)
- 🎥 [Expo - How to start your first Expo project in 2 minutes](https://www.youtube.com/watch?v=yOUAEfDuI44)


---

## 🔀 Other

- 🐦 [Find memory issues using Chrome Dev Tools](https://x.com/addyosmani/status/1796527052306419820)
- 👀 [Vitest Browser Mode](https://github.com/vitest-dev/vitest/discussions/5828)
- 📜 [10 modern Node.js runtime features to start using in 2024](https://snyk.io/blog/10-modern-node-js-runtime-features/)
- 📜 [Live types in a TypeScript monorepo - stop writing dead TypeScript](https://colinhacks.com/essays/live-types-typescript-monorepo)
- 📜 [How To Use Corepack](https://www.totaltypescript.com/how-to-use-corepack)
- 📜 [Promises From The Ground Up](https://www.joshwcomeau.com/javascript/promises/)
- 📜 [Zero - Rethinking local-first, general-purpose sync engine for the web](https://zerosync.dev/)
- 📦 [Turborepo 2.0 - New terminal UI, watch mode, all-new docs](https://turbo.build/blog/turbo-2-0)
- 📦 [Biome 1.8 - CSS support, new reports, CLI improvements...](https://x.com/biomejs/status/1797963672004043040)
- 📦 [Deno 1.44 - Private npm registries, improved Node.js compat, and performance boosts](https://deno.com/blog/v1.44)

---

## 🤭 Fun

[![Thank you JavaScript](https://thisweekinreact.com/emails/issues/188/meme.jpg)](https://x.com/fireship_dev/status/1796526654183059925)

See ya! 👋