This Week In React #138: React-Router, Rspack, RSC, Storybook, Million, Superflare, Tremor, React-Email, VisionCamera, Proto...
Tags: react, reactnative
Published: 2023-03-15 20:04:56

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

Hi everyone!

While everyone is playing with GPT-4, I'm still reading the React articles for you!

A new `lazy` feature in React-Router looks very useful to avoid waterfalls.

The Rspack bundler in Rust has just been announced.

I'd like to create a referral program for this newsletter. The idea is to encourage you to share it with your friends and reward you if new subscribers join us. Do you have any idea what I can offer?

I thought of:

- +1 subscriber - access to my top 10 React articles ever
- +3 subscribers - access to a well-presented DB of good articles, sorted with tags and rating
- +5 subscribers - a public thank you on Twitter or LinkedIn
- +10 subscribers - your job offer in the newsletter
- +30 subscribers - a course of your choice from Just JavaScript (Dan Abramov), Three.js Journey (Bruno Simon)...
- +50 subscribers - a one-hour React consulting session

It's not easy to choose what to offer 😅. It's easier to manage digital products to get started, but I'm not closed to some physical products (stickers, socks, sneakers, backpack, mug,...).

Can you reply to this email directly to give me your opinion, and tell me what would motivate you the most?

---

💡 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

[![Suncel](https://thisweekinreact.com/emails/issues/136/suncel.jpg)](https://suncel.io/)

**[Build reusable blocks. Publish content faster. Get better Core Web Vitals and SEO.](https://suncel.io/)**

**Content editors** : a game changer for companies that need to produce a lot of content and
have a strong SEO strategy. Marketers and content editors can edit and publish pages
without any complexity. Eliminate long delays and publish instantly. Pages and images are
optimized thanks to Next.js in order to achieve perfect Core Web Vitals scores.

**Developers :** plug and play with your existing Next.js app. Number of benefits to use
Suncel CMS as developer :

- Build your reusable blocks in React
- SEO Meta and sitemap are generated automatically (thanks to our SEO module)
- Create your own custom settings in React
- Admin customizable in React
- No routing system needed to fit the CMS

**[Visit Suncel.io](https://suncel.io/)** | **[5mn demo video](https://www.youtube.com/watch?v=LUupLEZKp3w)**



---

## ⚛️ React

[![Lazy Loading Routes in React Router 6.4+](https://thisweekinreact.com/emails/issues/138/reactrouterlazy.jpg)](https://remix.run/blog/lazy-loading-routes)

**[Lazy Loading Routes in React Router 6.4+](https://remix.run/blog/lazy-loading-routes)**

[React-Router 6.9](https://github.com/remix-run/react-router/releases/tag/react-router%406.9.0) has just been released with a new lazy routes feature that allows to avoid waterfalls, and optimize the loading time of your apps. This is how Remix works, but you can now use this technique on any React-Router based app. Personally I plan to use it on Docusaurus (based on React-Router).

---

- 👀 [React Flight PR - Add Reply Encoding](https://github.com/facebook/react/pull/26360): streaming support for server => client.
- 👀 [Integrating Remix Router with React Transitions](https://twitter.com/dan_abramov/status/1634300734094057472): Dan Abramov suggests using `startTransition` in Remix. Suspended components outside `<Suspense>` boundaries should block the transition.
- 🧵 [Dan Abramov - "if you’re not composing GraphQL fragments from multiple components into one query \[...\] you’re missing 80% of the point of GraphQL"](https://twitter.com/dan_abramov/status/1634968234821844992): interesting discussions about Relay this week. Although quite intimidating, this GraphQL client has many advantages compared to simpler solutions (colocation, data masking...).
- 🧵 [70% of Docusaurus sites have good Core Web Vitals](https://twitter.com/sebastienlorber/status/1635661211579580429): my little rant because Docusaurus is often forgotten in the list of React meta-frameworks despite a high usage and good performance.
- 📜 [The Great Gaslighting of the JavaScript Era](https://www.spicyweb.dev/the-great-gaslighting-of-the-js-age/): violent criticism of React 😅 I don't share the same opinion and think that React developers are generally aware of the tradeoffs they make.
- 📜 [Client-side JavaScript and React criticism: What comes next?](https://molily.de/javascript-criticism/): more nuanced criticism, but I don't think React and progressive enhancement are incompatible, Remix is a good example.
- 📜 [State in React is Immutable](https://reacttraining.com/blog/state-in-react-is-immutable): good intro to the immutable model in React.
- 📜 [Where did Hooks come from?](https://reacttraining.com/blog/where-did-hooks-come-from): goes back to understand why we use hooks today. New React developers are not always aware of the problems encountered a few years ago.
- 📜 [Fine-tuning refs with useImperativeHandle](https://prateeksurana.me/blog/fine-tuning-refs-with-useimperativehandle/): good intro for this hook that allows a React component to expose an imperative API to its parents.
- 📜 [My experience learning React, web standards, and Remix](https://andre-landgraf.dev/blog/2023-03-11_web_standards_and_react): back to simplicity, less `useState` and more fullstack.
- 📜 [Send emails using React and Tailwind CSS](https://resend.com/blog/tailwind-with-react-email): React-Email now supports Tailwind classes.
- 📜 [Elegantly managing state and renders in React](https://remotion.com/blog/untangling-state-in-react):highlights how the batching of updates works, which can be surprising at first.
- 📜 [A Brief History of Reactivity](https://www.builder.io/blog/history-of-reactivity): compares the reactive model of various frameworks, including React (coarce-grain reactivity).
- 📜 [The Most Popular Node.js Frameworks in 2023](https://stackdiary.com/node-js-frameworks/)
- 📜 [Full-Stack TypeScript with tRPC and React](https://www.robinwieruch.de/react-trpc/)
- 📜 [Beautiful and mind-bending effects with WebGL Render Targets](https://blog.maximeheckel.com/posts/beautiful-and-mind-bending-effects-with-webgl-render-targets/)
- 🎥 [RSC with Dan Abramov and Joe Savona Live Stream](https://kentcdodds.com/blog/rsc-with-dan-abramov-and-joe-savona-live-stream)
- 🎥 [React's place in the frontend ecosystem](https://www.youtube.com/watch?v=GHRkN_G5BMc)
- 🎥 [Ranking every Full Stack Framework (By...TypeSafety?)](https://www.youtube.com/watch?v=zADNdGVIPBY)
- 🎥 [Unlock the Power of AI with Defer and NextJS 13 - UI Magic!](https://www.youtube.com/watch?v=kHsTp2LENUI)
- 📦 [Ink 4.0](https://github.com/vadimdemedes/ink/releases/tag/v4.0.0): the React renderer for CLI is now under React 18 and ESM.
- 📦 [Koestlich](https://twitter.com/coconut_xr/status/1633770307470098434): a "3D UI-kit" based on React-Three-Fiber.
- 📦 [Storybook 7.0 RC](https://github.com/storybookjs/storybook/releases/tag/v7.0.0-rc.0): API framework with Next.js support Component Story Format 3, MDX 2... See also the conf [Storybook Day 2023](https://www.youtube.com/watch?v=P0hJm5v8TJw)
- 📦 [Astro 2.1](https://astro.build/blog/astro-210/): Image component, Markdoc support.
- 📦 [Million 2.0](https://twitter.com/aidenybai/status/1634060432372813829): a virtual DOM based on the concept of "blocks" compatible with React and which can make it 70% faster 🤔
- 📦 [SWR 2.1](https://github.com/vercel/swr/releases/tag/v2.1.0): useSWRSubscription + useSWRInfinite parallel option
- 📦 [Superflare](https://superflare.dev/): fullstack toolkit for Cloudflare Workers with support for D1, R2, Session, Queues... integration with Remix, and soon Next.js?
- 📦 [Tremor 2.0](https://twitter.com/tremorlabs/status/1635064912153284609): UI lib to create dashboards, now based on Tailwind CSS.
- 📦 [next-route-visualizer](https://github.com/DiiiaZoTe/next-route-visualizer)
- 📦 [Radix - new Form primitive](https://twitter.com/radix_ui/status/1633483912755261443)
- 📦 [Nodl 1.0](https://twitter.com/emilwidlund/status/1634804041397022720)
- 📦 [Framer-Motion 10.3](https://twitter.com/mattgperry/status/1635641473319280646)
- 🐦 [Node.js site now using Next.js](https://twitter.com/leeerob/status/1633595208448311296)

---

## 💸 Sponsor

[![Surveyjs - Extensible JavaScript libraries for surveys and forms](https://thisweekinreact.com/emails/issues/136/surveyjs.jpg)](https://surveyjs.io/?utm_source=thisweekinreact&utm_medium=referral)

**[Extensible JavaScript libraries for surveys and forms](https://surveyjs.io/?utm_source=thisweekinreact&utm_medium=referral)**

[SurveyJS](https://surveyjs.io/form-library?utm_source=thisweekinreact&utm_medium=referral) is a set of open-source JavaScript form libraries that you can easily integrate into your web app. It lets you **create and run multiple forms**, retaining all sensitive data on your servers, or have **your own self-hosted WYSIWYG form builder** that non-tech users can use directly.

You can also **analyze survey results** in custom-built dashboards, save your forms to PDF, or simply **convert them to editable PDF files**. It offers native support for **React and Angular rendering** and total freedom of choice as to the backend, because **any server + database combination is fully compatible**.

---

## 📱 React-Native

- 📜 [Building smooth Shared Element Transitions in React Native](https://mrousavy.com/blog/Shared-Element-Transitions-in-React-Native): good intro to Shared Element Transitions in Reanimated 3. It looks simple and flexible to use, with the possibility to customize the transition with a worklet.
- 📜 [Camera APIs on Android](https://mrousavy.com/blog/Camera-APIs-on-Android): Marc Rousavy explains why camera management is complicated, especially on Android. VisionCamera v3 should switch back to Camera2, and leave the CameraX API aside for now.
- 📜 [Shopify Tophat - Crafting a Delightful Mobile Developer Experience](https://shopify.engineering/shopify-tophat-mobile-developer-testing): Shopify has created its own DX for its mobile apps, not too far from the Expo experience. Interesting article but not totally related to React-Native.
- 📜 [Expo - EAS Build will Default to M1/M2 for iOS Builds](https://blog.expo.dev/eas-build-will-default-to-m1-m2-for-ios-builds-24208008a68d): Expo explains the transition to Apple silicon builders to reduce build times on iOS (by 40% for M1, and 10% more for M2)
- 📜 [Microsoft - Adding Jest Snapshot Testing to React Native Windows Apps](https://devblogs.microsoft.com/react-native/2023-03-02-adding-snapshot-testing-to-rnw-apps/)
- 📜 [Using React Native VisionCamera: Demo and alternatives](https://blog.logrocket.com/react-native-visioncamera-demo-alternatives/)
- 🧑‍🎓 [Bridging Tutorial - Learn how to use any platform API in React Native app](https://mateusz1913.github.io/rnbridgingtutorial/): comprehensive resource for creating native modules.
- 🎙️ [RNR 262 - Maestro: The App-solute Solution for Mobile UI Testing](https://reactnativeradio.com/episodes/rnr-262-maestro-the-app-solute-solution-for-mobile-ui-testing)
- 📦 [Metro 0.76](https://github.com/facebook/metro/releases/tag/v0.76.0): API ported from Webpack that should [allow code splitting](https://twitter.com/sebastienlorber/status/1635671177082417158) and will be used by Expo Router.
- 👀 [Expo Web Global CSS support](https://twitter.com/Baconbrix/status/1633562265189326855)


---

## 🧑‍💻 Jobs

🧑‍💼 [**Callstack - Senior React Native Developer - Fully Remote, PLN 21-32k net on B2B, monthly**](https://www.callstack.com/senior-react-native-developer)

Do you want to work on the world's most used apps? Would you like to co-create the React Native technology? Join the Callstack team of React & React Native leaders. Check our website for more details. We are looking forward to seeing your application - show us what you've got!

🧑‍💼 [**G2i - 100% Remote React Native Jobs**](https://twitter.com/gabe_g2i/status/1563204813881425926?s=20&t=ArRLC77BpRwXXCdx8fnUqw)

We have several roles open for developers focused on React Native! Pay is ~160k plus 10% bonus. You must have production experience with RN and be based in the US. DM [@gabe_g2i](https://twitter.com/gabe_g2i) to learn more and don't forget to mention This Week in React.

💡 [How to publish an offer?](https://thisweekinreact.com/sponsor)

---

## 🔀 Other

[![Rspack](https://thisweekinreact.com/emails/issues/138/rspack.jpg)](https://www.rspack.dev/)

**[Rspack](https://www.rspack.dev/)**

Official announcement of the Rust bundler from ByteDance, compatible with Webpack but much faster. It will be hard to choose between Rspack and Turbopack, which also announced [upcoming support for Webpack loaders](https://twitter.com/jaredpalmer/status/1619071988181651456). Note that [Unplugin 1.3](https://twitter.com/antfu7/status/1634517321392726017) already supports Rspack and allows to create agnostic bundler plugins. There is no Unplugin Turbopack support yet, but I hope it is planned!

Read also [Rspack: The Rust-Based Web Bundler that Combines High Performance with Interoperability](https://valor-software.com/press-release/rs-pack-rust-based-web-bundler)

---

- [Jest 29.5](https://github.com/facebook/jest/releases/tag/v29.5.0): CLI `--randomize` option.
- [CSS Nesting](https://developer.chrome.com/articles/css-nesting/): landing in Chrome 112!
- [Proto, a next-generation toolchain manager](https://moonrepo.dev/blog/proto): new alternative to fnm or Volta to manage its Node.js runtime (but not only).
- [SPA view transitions land in Chrome 111](https://developer.chrome.com/blog/spa-view-transitions-land/)
- [TypeScript’s Migration to Modules](https://devblogs.microsoft.com/typescript/typescripts-migration-to-modules/)
- [Cloudflare Workers - Node.js compat demo](https://twitter.com/jasnell/status/1633949738516230144)
- [ts-reset 0.4](https://twitter.com/mattpocockuk/status/1633525273860661257)
- [Consider Animating Your Canvas in a Web Worker](https://www.macarthur.me/posts/animate-canvas-in-a-worker)
- [All JavaScript and TypeScript Features of the last 3 years](https://betterprogramming.pub/all-javascript-and-typescript-features-of-the-last-3-years-629c57e73e42)
- [How to measure CWVs on SPAs](https://estelafranco.com/blog/spa-cwv/)
- [JavaScript Oxidation Compiler v0.1](https://github.com/Boshen/oxc)
- [Why Turborepo is migrating from Go to Rust](https://vercel.com/blog/turborepo-migration-go-rust)

---

## 🤭 Fun

[![alt](https://thisweekinreact.com/emails/issues/138/meme.jpg)](https://twitter.com/sebastienlorber/status/1635592966973669379)

🤣 [Other funny tweets this week](https://twitter.com/sebastienlorber/status/1635710256876777472)



See ya! 👋