This Week In React #190: Suspense, Internals Explorer, DevTools, RSC + Vite, Codemod, Astro, INP, composition, Reassure...
Tags: react, reactnative
Published: 2024-06-28 12:29:02

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

Hi everyone!

This week it looks like we are finally entering the summer/holiday season and the pace of major React announcements is slowing down. We will also be taking a short summer break, skip 2 issues, and be back on July 17.

On the React side, we continue to have interesting content related to the Suspense drama from last week. A new React Router feature permits you to code split your route tree.

On the React Native side, it looks like the team is trying to release v0.75 as RC, and encountering some roadblocks, but it’ll probably be out soon.

The most exciting news to me is the TypeScript 5.5 stable release: it’s a great one, notably for predicate type inference! The State of JS survey results are also out if you want to explore JS trends.

---

💡 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

[![The Category-Defining React Grid for Your Enterprise](https://thisweekinreact.com/emails/issues/190/advertfinal.jpg)](https://1771technologies.com/graphitegrid)

**[The Category-Defining React Grid for Your Enterprise](https://1771technologies.com/graphitegrid)**

Data grids are complex components of web applications, but current solutions are inefficient, require a lot of maintenance, and perform poorly. [Graphite Grid](https://1771technologies.com/graphitegrid) transforms the landscape with two key features: retargetable rendering and reactive signal state.

**Graphite Grid** separates grid state from view logic, allowing a single unified state model to support a variety of render targets, declaratively or imperatively. It includes a **DOM and Canvas** renderer, giving developers flexible, high-performance options 🚀.

Graphite Grid is declarative and consistent, leveraging state signals to ensure seamless integration with your application. Designed with **React in mind**, it is the only JavaScript data grid built with React's state management primitives. [Try it now!](https://1771technologies.com/graphitegrid/demo)

---

## ⚛️ React

[![React-Router 6.24 - Lazy Route Discovery](https://thisweekinreact.com/emails/issues/191/rr.jpg)](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6240)

**📦 [React-Router 6.24 - Lazy Route Discovery](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v6240)**

This React Router release includes a new `unstable_patchRoutesOnMiss` hook that will be called when React Router can’t match any existing route. It permits you to load additional routes and implement code splitting for your routes instead of keeping them all in a single monolithic module. A welcome feature for large apps with thousands of routes, that now don’t need to load all of them upfront, delaying hydration.

Remix was supposed to take a nap, but apparently not yet! 📦 [Remix 2.10](https://remix.run/docs/en/main/start/changelog#v2100) is out and already leverages that new React Router feature by exposing it through a convenient [“Fog of War”](https://remix.run/docs/en/main/guides/fog-of-war) feature that you can enable with a simple `future.unstable_fogOfWar` flag. An early discovery optimization has also been implemented to avoid waterfalls.

---

- 💸 [Meilisearch — Build fast, typo-tolerant search with React](https://dub.sh/ueC2f57)
- 👀 [React.dev PR - Add branding context menu](https://github.com/reactjs/react.dev/pull/6986): Right-click the website navbar logo to access the official svgs and brand colors of React.
- 👀 [Next.js PR draft - `nextConfig.requiredEnv`](https://github.com/vercel/next.js/pull/67187)
- 👀 [Next.js PR draft - type check for `env`](https://github.com/vercel/next.js/pull/67157s)
- 🐦 [Joe Savona - "Some thoughts on the suspense changes from 19 RC"](https://x.com/en_JS/status/1803480672327311425): To avoid situations such as past week’s Suspense drama, the React team is working on changes to get feedback earlier (working groups, RFC, canary…).
- 🐦 [Lee Robinsin - "Here's where we're headed with caching in Next.js"](https://x.com/leeerob/status/1803824227704877236): “Our goal is to make all async operations (like doing a `fetch`) opt into dynamic rendering”, “We believe Partial Prerendering will become the default”.
- 🗓️ [React Rally](https://reactrally.com/?utm_source=thisweekinreact) - 🇺🇸Utah - 12-13, August - Get a 10% discount with code "TWIR". There’s a React Server Components [workshop](https://reactrally.com/workshop) with Kent C. Dodds
- 📨 [ECMAScript News - Discover our partners' newsletter to keep up to date with ES, TC39, JS tooling, and runtimes](https://ecmascript.news/?utm_source=thisweekinreact)
- 📜 [Component, colocation, composition: A note on the state of React](https://bobaekang.com/blog/component-colocation-composition/): The recent Suspense drama highlights the gap between React’s component-oriented vision and its current limitations.
- 📜 [From markdown to video - Animated code walkthroughs with Code Hike and Remotion](https://v1.codehike.org/blog/remotion): If you have seen recent code animation videos of Matt Pocock or Delba, here’s a great article and demos to understand how it works.
- 📜 [Understanding React Compiler](https://tonyalicea.dev/blog/understanding-react-compiler/): Explains how the React compiler work, starting from the basics (transpiler, AST, memoization), then analyzing the compiler output of a concrete example.
- 📜 [Wait for pending: A (not great) alternative Suspense algorithm](https://dev.to/alexandereardon/wait-for-pending-a-not-great-alternative-suspense-algorithm-1gdl): Explores the possibility of a different algorithm for Suspense, with different tradeoffs.
- 📜 [How to make draggable Framer Motion elements snap to breakpoints](https://sinja.io/blog/framer-motion-drag-snap-points): Interactive article implementation snap points on top of Framer Motion, including inertia/velocity support.
- 📜 [Mobx Memoizes Components (You don't need React Compiler)](https://www.mikejohnson.dev/posts/2024/06/mobx-react-compiler): Takes an existing demo using the React compiler and turns it into an optimized Mobx app with minimal changes. MobX prevents re-renders by auto-tracking dependencies. Note this [Mobx issue](https://github.com/mobxjs/mobx/issues/3874) explains why Mobx (based on proxies) is not compatible with the compiler, and lib creator also confirms it’s already optimized.
- 📜 [Web Workers, Comlink, Vite and TanStack Query](https://johnnyreilly.com/web-workers-comlink-vite-tanstack-query): React Query being an “async state manager”, it also works well to offload expensive work from the main thread.
- 📜 [Storybook - Visual testing: The greatest trick in UI development](https://storybook.js.org/blog/visual-testing-is-the-greatest-trick-in-ui-development/): I agree that too many devs miss out on visual regression testing. It has a really great ROI, considering how easy it is to add to an existing Storybook. As this article shows, covering the same component with React Testing Library requires more work.
- 📜 [Communication Between Client Components in Next.js](https://www.thisdot.co/blog/communication-between-client-components-in-next-js): With RSCs, new challenges emerged to make 2 client components communicate, and you might not be able to lift the state up unless the parent is also a client component. This article proposes 3 solutions: using a Provider, search params, and server state.
- 📜 [How to Validate Form in Remix with clientAction](https://sergiodxa.com/tutorials/validate-form-in-remix-with-clientaction): Using the new Remix `clientAction` export can nicely complete the server `action` validation and progressively enhance your form with local errors.
- 📜 [Type-safe TanStack Query with OpenAPI](https://ruanmartinelli.com/blog/tanstack-query-openapi): Shows how to create generic React Query hooks (`useGetQuery`, `usePostMutation`...) that are fully typed according to an OpenAPI specification.
- 📜 [How To Use Google Sheets as a Database With React via Next.js](https://thenewstack.io/how-to-use-google-sheets-as-a-database-with-react-and-ssr/)
- 📜 [Is it ok to pass setState as a prop in React?](https://tigerabrodi.blog/is-it-ok-to-pass-setstate-as-a-prop-in-react)
- 📦 [StyleX 0.7 - CLI (experimental), Literal names for CSS variables](https://stylexjs.com/blog/v0.7.0): New CLI transforms an entire folder and can be an alternative to the bundler integration.
- 📦 [Next-Safe-Action 7.0 - Type safe and validated Server Actions](https://github.com/TheEdoRan/next-safe-action/releases/tag/v7.0.0): See also the [v6 to v7 migration guide](https://next-safe-action.dev/docs/migrations/v6-to-v7).
- 📦 [Astro 4.11 - 500 page improvements, `<Code>` component Shiki transformer](https://astro.build/blog/astro-4110/)
- 📦 [React-Admin 5.0 - Improves on UI, DX, app init, Data Providers, forms…](https://marmelab.com/blog/2024/06/20/react-admin-v5.html)
- 📦 [Shopify Hydrogen Update - Visual Editor, Optimistic Cart, Vite stable, RichText component, SEO meta export…](https://hydrogen.shopify.dev/update/summer-editions-24-announcing-the-hydrogen-visual-editor-and-a-ton-of-dx-improvements)
- 📦 [stan-js - Minimalistic state management library](https://codemask-labs.github.io/stan-js/)
- 🎥 [Jack Herrington - React 19's useOptimistic: everything you need to know](https://www.youtube.com/watch?v=QWVr7uDyBXE)
- 🎥 [Theo - I Used To Hate Next.js…](https://www.youtube.com/watch?v=6q1eL7IcKzw)
- 🎥 [Dave Gray - Nextjs Server Actions Just Got Better (using next-safe-action)](https://www.youtube.com/watch?v=ahB3DgUMs1A)
- 🎥 [Ryan Carniato - Facing Frontend's Existential Crisis, React Summit 2024](https://www.youtube.com/watch?v=nzbV0YgSBuo)
- 🎙️ [Syntax - What’s Next for NextJS with Tim Neutkens](https://www.youtube.com/watch?v=fXugpgknScY)



---

## 💸 Sponsor

[![WorkOS: Modern Identity Platform for B2B SaaS](https://thisweekinreact.com/emails/issues/189/WorkOS.jpg)](https://workos.com/?utm_source=thisweekinreact&utm_medium=newsletter&utm_campaign=q22024)

**[WorkOS: Modern Identity Platform for B2B SaaS](https://workos.com/?utm_source=thisweekinreact&utm_medium=newsletter&utm_campaign=q22024)**

With WorkOS you can start selling to enterprises with just a few lines of code.

🔐 WorkOS 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**.

✨ 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

This section is authored by [Benedikt](https://twitter.com/bndkt).

- 💸 [WithFrame - Ready to Use React Native Components](https://withfra.me/?utm_source=thisweekinreact&utm_medium=email&utm_campaign=quick-link--4)
- 🐦 [Marc Rousavy on how to get relevant log or crash information in RN for creating issues in open source libs](https://x.com/mrousavy/status/1805637303726973437)
- 🗓️ [The Geek Conf](https://www.thegeekconf.com/?utm_source=thisweekinreact) - 🇩🇪 Berlin - 18 & 25 July - Get a 10% discount with code "TWIR". Mo Khazali — Head of Mobile at Theodo UK, Matteo Collina — CTO of Platformatic.dev, and Siddharth Kshetrapal —Staff software engineer at GitHub, will speak !
- 🗓 [Chain React Conf](https://chainreactconf.com/?utm_source=thisweekinreact) - 🇺🇸 Portland, OR - July 17-19. The U.S. React Native Conference is back with engaging talks and hands-on workshops! Get 15% off your ticket with code “TWIR”
- 👀 [Revert "Make the New Architecture the default"](https://github.com/facebook/react-native/commit/37e8fa113ef6a8be7cd057b2bf6ffaa4ae6439d9): it looks like turning the New Arch on by default might be postponed and will finally not be part of v0.75?
- 👀 [Shopify FlashList PR - New architecture support merged (but not released yet)](https://github.com/Shopify/flash-list/pull/550)
- 👀 [Fishjam Cloud - New project by Software Mansion to bring video streaming to React Native](https://cloud.fishjam.stream/)
- 👀 [expo-router-native-intent-demo - Using +native-intent API in Expo Router to support "Copy to app" functionality on iOS](https://github.com/EvanBacon/expo-router-native-intent-demo)
- 📜 [Client guide to React Native modules](https://ospfranco.com/client-guide-to-react-native-modules/): Oscar greatly explains the differences, pros, and cons of the different ways to expose native modules to React Native, and helps us choose the best solution depending on context.
- 📜 [Bridging React Native and Rust via JSI](https://ditto.live/blog/bridging-react-native-and-rust-via-jsi): An article by Ditto, a data sync engine written in Rust, on how they bridged their core logic (in Rust) to RN via JSI.
- 📜 [On-device AI/ML in React Native](https://blog.swmansion.com/on-device-ai-ml-in-react-native-137918d0331b): This is fascinating stuff, which would’ve been inconceivable only a short while ago. Building real-time camera filters with on-device AI in RN.
- 📜 [From web to native with React Native and Expo](https://expo.dev/blog/from-web-to-native-with-react-native-and-expo): Describes the journey of a web dev who built their first mobile app using RN/Expo.
- 📜 [Just as Google, BAM believes in Kotlin Multiplatform](https://www.bam.tech/article/just-as-google-bam-believes-in-kotlin-multiplatform): The mostly RN-focused company BAM finds CMP/KMP a compelling choice among the available cross-platform solutions and explains the advantages/limitations.
- 📜 [Expo - FCM v1 Migration Deadline Changed to July 20th](https://expo.dev/blog/fcm-v1-migration-deadline-changed-to-july-20th)
- 🎥 [Simon Grimm - TV Apps with React Native](https://www.youtube.com/watch?v=4S7Ftg58Yeg)
- 🎥 [JavaScript Mastery - Free 4,5h React Native Course for Beginners in 2024](https://www.youtube.com/watch?v=ZBCUegTZF7M)


---

## 🔀 Other

- 📊 [State of JavaScript 2023 - Survey Results](https://2023.stateofjs.com/en-US)
- 📜 [How JavaScript Is Finally Improving the Module Experience](https://thenewstack.io/how-javascript-is-finally-improving-the-module-experience/)
- 📜 [Inline conditionals in CSS, now?](https://lea.verou.me/blog/2024/css-conditionals-now/)
- 📜 [GitHub Copilot Extensions are all you need](https://code.visualstudio.com/blogs/2024/06/24/extensions-are-all-you-need)
- 📜 [MDN - New JavaScript Set methods](https://developer.mozilla.org/en-US/blog/javascript-set-methods/)
- 📦 [TypeScript 5.5 - Inferred type predicates, narrowing for indexed access, JSDoc @import](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/)
- 📦 [farm - Extremely fast Vite-compatible web build tool written in Rust](https://github.com/farm-fe/farm)
- 📦 [Node 20.15 - Test plans, –inspect-await](https://nodejs.org/en/blog/release/v20.15.0)
- 📦 [node-swift - Create Node modules in Swift](https://github.com/kabiroberai/node-swift)
- 🎥 [Matt Pocock TypeScript 5.5 is a banger](https://www.youtube.com/watch?v=sciBO_IaxTw)

---

## 🤭 Fun

[![alt](https://thisweekinreact.com/emails/issues/191/meme.jpg)](https://x.com/ccccjjjjeeee/status/1804814043359621254)

See ya! 👋