This Week In React #132: Astro, Remix, Server Components, useGlobalState, Next.js, Redwood, Expo Router, Expo Image...
Tags: react, reactnative, javascript, typescript
Published: 2023-01-25 14:28:42

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

Hi everyone!

This week we have some nice releases with Astro 2.0 and Remix 1.11. Also some interesting content around Server Components.

React-Native is not left out with Expo Router in release candidate, Expo Image in beta, and a new solution to create Android widgets.

I was invited to the show [Learn With Jason - Create and deploy a documentation website](https://www.learnwithjason.dev/create-and-deploy-a-documentation-website?utm_source=thisweekinreact) in which Jason makes his first steps on Docusaurus.

Discover the [ES.next News newsletter](http://esnextnews.com/?utm_source=thisweekinreact), a good source of information to keep up to date on the evolution of the JavaScript language, the TC39 committee and JS tooling like ESLint, Babel, Bun, Prettier...

---

💡 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

[![refine](https://thisweekinreact.com/emails/issues/132/refine.png)](https://github.com/refinedev/refine)

[**refine - 100% open-source, headless React framework for building CRUD apps**](https://github.com/refinedev/refine)

Get ready to take your skillset to the next level! We are thrilled to launch an Open Source refine Hackathon

You can win $1500 and special swag kits!

We are excited to collaborate with Strapi, Appwrite, Meilisearch, and Medusa. They are sponsoring the refine Hackathon and the winners will get a swag kit from each of them!

[More information about the Hackathon](https://refine.dev/blog/refine-hackathon/).

---

## ⚛️ React

[![Astro 2.0](https://thisweekinreact.com/emails/issues/132/astro2.jpg)](https://astro.build/blog/astro-2/)

**[Astro 2.0](https://astro.build/blog/astro-2/)**

Astro releases its v2. New features highlighted:

- Content Collections: Automatic type-safety for Markdown & MDX.
- Hybrid Rendering: Static? Dynamic? Get the best of both worlds.
- Redesigned Error Overlays
- Improved Dev Server (HMR)
- Vite 4.0
- Public Roadmap

See also the article [Introducing Content Collections: Type-Safe Markdown in Astro 2.0](https://astro.build/blog/introducing-content-collections/). It's about validating the front matter with Zod, to be able to use this data in a typed way in React components, and to have good error messages displayed with a good DX when front matter data that doesn't respect the schema. Definitely a good idea, by the way [Docusaurus does it too](https://github.com/facebook/docusaurus/issues/4591) 😜.

---

[![Remix 1.11](https://thisweekinreact.com/emails/issues/132/remix0.11.jpg)](https://github.com/remix-run/remix/releases/tag/remix%401.11.0)

**[Remix 1.11](https://github.com/remix-run/remix/releases/tag/remix%401.11.0)**

A nice Remix release with the main new features:

- `defer` + `<Await>` to initiate a streamed response. The loader can return promises that will be awaited later on the client side.
- [Route Convention v2](https://remix.run/docs/en/v1/file-conventions/route-files-v2): a new convention (flat routes) that can be activated now and will become the default convention in v2.
- Experimental support for CSS imports, CSS Modules, Vanilla Extract.

---

- 📖 Beta docs: ["the main remaining blocker is the landing page which we’re working on now"](https://twitter.com/dan_abramov/status/1617543301477060608)
- 🐦 ["If you use React, you should be using a React framework"](https://twitter.com/acdlite/status/1617611126514266112): Andrew Clark gives good reasons to use a framework. If you don't use one, you end up creating a not-so-great one yourself.
- 📜 [The building blocks of great docs](https://www.mux.com/blog/the-building-blocks-of-great-docs): migration in progress of a technical documentation to Next.js 13. The use of Server Components brings a lot of benefits on a site with lots of static content.
- 📜 [useGlobalState - Sharing state between React components without context or fancy libraries](https://yoavik.com/snippets/use-global-state): proposes to create its own global state abstraction, without the need to use providers.
- 📜 [What I Like About Astro](https://www.macarthur.me/posts/what-i-like-about-astro): interesting comparison with Gatsby or Next.js on data sourcing, integrations (RSS, sitemap...). Astro makes it difficult to have a slow site.
- 📜 [Improving readability with React Wrap Balancer](https://vercel.com/blog/react-wrap-balancer): details the inner workings of React Wrap Balancer which allows to balance headlines without producing layout shifts (missing CSS feature).
- 📜 [Things I want to see in JavaScript and Frontend development in 2023](https://paularmstrong.dev/blog/2023/01/20/javascript-and-frontend-things-to-see-in-2023/): interesting predictions and a hot criticism of React 🔥
- 📜 [Use Remix as a SPA only](https://sergiodxa.com/articles/use-remix-as-a-spa-only): using a `<ClientOnly>` component.
- 📜 [Gatsby 5, TypeScript, and Generated GraphQL Types: A Walkthrough](https://www.gatsbyjs.com/blog/gatsby-5-typescript-and-generated-graphql-types-a-walkthrough/)
- 📜 [Modals with React Router 6 and Remix](https://dev.to/infoxicator/modals-with-react-router-6-and-remix-1e35)
- 📜 [Why React Router is excellent for Micro-Frontends](https://dev.to/infoxicator/why-react-router-is-excellent-for-micro-frontends-2a21)
- 📜 [useAsyncEffect: The Missing React Hook](https://marmelab.com/blog/2023/01/11/use-async-effect-react.html)
- 📜 [Test-driven development of NextJS API routes](https://massimilianomirra.com/notes/test-driven-development-of-nextjs-api-routes)
- 📜 [How to build a better React map with Pigeon Maps and Mapbox](https://evilmartians.com/chronicles/how-to-build-a-better-react-map-with-pigeon-maps-and-mapbox)
- 📜 [Refraction, dispersion, and other shader light effects](https://blog.maximeheckel.com/posts/refraction-dispersion-and-other-shader-light-effects/)
- 🧑‍🎓 [Josh Comeau - Joy of React - Couse launch](https://twitter.com/JoshWComeau/status/1617553220242661377)
- 🎨 [TanStack Query multi-client sync demo](https://twitter.com/aryan__deora/status/1616097346558754819)
- 🎨 [DevTools - Toggle Suspense boundaries demo](https://twitter.com/delba_oliveira/status/1617205554547683328)
- 👀 [Remix PR - add built-in PostCSS and Tailwind support](https://github.com/remix-run/remix/pull/5229)
- 👀 [XState PR - createProvider](https://twitter.com/DavidKPiano/status/1617537783018422273)
- 👀 [React docs PR - Replace Create React App recommendation with Vite](https://github.com/reactjs/reactjs.org/pull/5487): controversial PR this week
- 📦 [Bright - React Server Component for syntax highlighting](https://github.com/code-hike/bright): promising WIP package for modern syntax highlighting. In a Node.js/server context, we can run heavier code like parsing an AST rather than using regexp (Prism).
- 📦 [Redwood 4.0 RC](https://twitter.com/RedwoodJS/status/1616002999729389568): new API Auth, GraphQL Yoga v3, GraphQL Armor, Node.js 16/18...
- 📦 [shadcdn/ui - Beautifully designed components built with Radix UI and Tailwind CSS](https://twitter.com/shadcn/status/1617916719242293248)
- 📦 [next-mdx-remote 4.3 - Server Components Support (experimental)](https://github.com/hashicorp/next-mdx-remote/releases/tag/v4.3.0)
- 🎥 [Astro 2.0 is Revolutionary!](https://www.youtube.com/watch?v=gi4c7fbeURc)
- 🎥 [Lee Robinson - Revisiting my React course 3 years later](https://www.youtube.com/watch?v=DQk0TWmgYXw)

---

## 📱 React-Native

[![Expo Router RC](https://thisweekinreact.com/emails/issues/132/expo-router.jpg)](https://blog.expo.dev/announcing-the-expo-router-v1-release-candidate-c5680b88a18c)

**[Expo Router v1 Release Candidate](https://blog.expo.dev/announcing-the-expo-router-v1-release-candidate-c5680b88a18c)**

Expo Router proposes to create your mobile navigation (still based on React-Navigation) using file-system naming conventions, as do most React web frameworks already. We can find the usual features like layout routes, dynamic routes, error boundaries...

The most interesting for me: the universal support. Navigation is based on links, a `<Link>` component and Metro web support (experimental). Now that the native part of Expo is working well, I wouldn't be surprised to see Expo gradually become a universal full-stack framework, and realize [Andrew Clark's prediction](https://twitter.com/acdlite/status/1489755769876754434).

---

- 👀 [Expo-Image in beta](https://twitter.com/JI/status/1616337848558551041): Expo's new image component goes into beta. Performant, cross-platform (web/mobile), many formats, placeholders, object-fit... Check the [doc](https://docs.expo.dev/versions/unversioned/sdk/image/).
- 📖 [Maestro Guides - React-Native](https://maestro.mobile.dev/platform-support/react-native): the e2e testing framework now offers a React-Native doc page.
- 📦 [React-Native-Android-Widget](https://saleksovski.github.io/react-native-android-widget/): new package to create Android widgets, using dedicated UI primitives. Has a widget preview system. Easy to use in Expo (Config Plugin).
- 📦 [Moti 0.22](https://twitter.com/FernandoTheRojo/status/1616583066054545408): a fix brings Hermes support.
- 📦 [Metro 0.74](https://github.com/facebook/metro/releases/tag/v0.74.0): great performance improvements.
- 🎙️ [RNR 256 - Expo Router with Evan Bacon](https://reactnativeradio.com/episodes/rnr-256-expo-router-with-evan-bacon)

---

## 🧑‍💻 Jobs

🧑‍💼 [**Lab - Frontend Developer - Hybird Remote, London**](https://4dayweek.io/remote-job/frontend-developer-lab?utm_source=newsletter&utm_medium=newsletter&utm_campaign=weekinreact)

Join the Riverr agency as a frontend developer, working on client projects using modern technologies, such as React, Next.js, TypeScript. A [**4/day week**](https://4dayweek.io/?utm_source=newsletter&utm_medium=newsletter&utm_campaign=weekinreact) job.

🧑‍💼 [**TLDR - Senior Software Engineer (Remote, $120k-200k)**](https://tldr.tech/jobs/senior-software-engineer/23?utm_source=thisweekinreact)

The TLDR newsletter is hiring its first engineer to help build out the hiring platform along with other internal projects. Looking for someone with experience shipping side projects or on small teams, with experience in Next.js and Postgres/Supabase.

🧑‍💼 [**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


- ["There’s a full port of webpack to rust underway. It’s Not turbopack."](https://twitter.com/ScriptedAlchemy/status/1617815340905553921)
- [V8 - Introducing the WebAssembly JavaScript Promise Integration API](https://v8.dev/blog/jspi)
- [WebKit Features in Safari 16.3](https://webkit.org/blog/13691/webkit-features-in-safari-16-3/)
- [The truth about CSS selector performance](https://blogs.windows.com/msedgedev/2023/01/17/the-truth-about-css-selector-performance/)
- [Making Generic Functions Pass Type Checking](https://type-level-typescript.com/articles/making-generic-functions-pass-type-checking)
- [CSS Nesting - Blink Intent to ship](https://twitter.com/sebastienlorber/status/1617882799100526595)
- [TypeScript 5.0 PR - Decorators support](https://twitter.com/robpalmer2/status/1616215250055090187)
- [Bun 0.5](https://bun.sh/blog/bun-v0.5.0)
- [esbuild 0.17](https://github.com/evanw/esbuild/releases/tag/v0.17.0)
- [ESLint's 2022 year in review](https://eslint.org/blog/2023/01/eslint-2022-year-review/)
- [Building and delivering frontends at scale](https://frontendmastery.com/posts/building-and-serving-frontends-at-scale/)
- [Writing a tiny tRPC client](https://trpc.io/blog/tinyrpc-client)

---

## 🤭 Fun

[![alt](https://thisweekinreact.com/emails/issues/132/meme.jpg)](https://twitter.com/fireship_dev/status/1617708616496345088)