Hi everyone!
@ThisWeekInReact is our brand-new X account, hit subscribe! The promise is to share and retweet interesting things happening in the React community in near-real-time, and to be as high-signal/low-noise as possible.
This week React Server Components have been once-again the subject of various articles and discussions. The community has mitigated feelings about Next.js App Router. Even if people embrace the vision, they seem a little disappointed by its current implementation. Let's hope it's only temporary π€.
React Native has been particularly interesting this week. The State of React Native survey results have been published, and the general feeling towards React Native is increasingly positive. There are also interesting bits related to Skia, Reanimated, or the bridgeless mode. The community is excited about Expo becoming a full-stack universal framework.
Happy reading!
π‘ Subscribe to the official newsletter to receive an email every week!
πΈ Sponsor
Axiom - the best logging platform for Vercel apps
π΄ Sleep peacefully knowing that Axiomβs zero-config observability for Vercel projects has you covered.
- Use Axiom's pre-built dashboard for an overview across all your Vercel logs and vitals, drill down to specific projects and deployments, and get insight on how functions are performing with a single click.
- next-axiom allows you to send logs and events from any part of your Next.js projects - client, edge, or server-side - without any special configuration.
- Easily send structured logs directly from your code and analyze them together with Vercel logs.
Axiom efficiently captures 100% of your event data so youβll never have to worry about sampling or retention, and youβll never have to guess what your users are experiencing.
PS:Β I use it myself to monitor the newsletter signupsΒ π
βοΈ React
π₯ Next.js Explained - Partial Prerendering
Itβs is not often that a video makes the headlines here, but this one is different for a few reasons.
First the topic is super interesting and well-explained with many animated visualizations. Partial pre-rendering is a Next.js 14 experimental feature that completes the Next.js vision and offers the best of both worlds between static and dynamic rendering. This makes Next.js a multi-paradigm framework that supports all ranges of rendering diversity. This new feature is simple to adopt, builds on top of Suspense, and doesnβt introduce new APIs: you just need to turn a flag on.
Second: this incredibly well-produced video has been created with Remotion, using React web code π. Good job Delba, you nailed it! We canβt wait to see more videos like this and to know more about your Remotion creative process. On a related note, the Remotion team just shared theirs with a behind the scene of GitHub Unwrapped 2023.
- πΈ Accelerate your workflow with MightyMeld, a visual dev tool for React codebases. Drag, drop, click, and prompt your UI into place while you hand-code the rest of it.
- π React core PR - react-server-dom-parcel package: Devon from Parcel working on a new bundler integration.
- π Remix - support for Cloudflare through the Remix Vite plugin
- π¦ Partykit - Real-time React Server Component sneak-peek
- π My first impressions of Panda CSS: Baptiste likes Tailwind but now prefers Panda for multiple reasons, including type-safety, the ability to group styles and make them more readable, and its out-of-the-box support for styles merging and variants.
- π Fix Next.js Routing to Have Full Type-Safety: the Next.js typedRoute experimental feature is not good enough. We can improve routing type-safety (route params, search params, linkingβ¦) thanks to a route builder API.
- π Migrating to Next.js App Router: the good, bad, and ugly: Flightcontrol rebuilt from scratch their dashboard with Next.js App Router and share feedback. There are positive experiences, but overall their team would have chosen Remix instead, and theyβd prefer to use another language than using the Next.js dev server again π (note they are stuck on Next.js 13.5 and performance improved lately).
- π How To Use forwardRef With Generic Components: Matt wraps forwardRef to redefine its types and fix type inference problems.
- π Updating public Next.js environment variables without rebuilds: the NEXT_PUBLIC env variables are inlined in the client bundles at build time. This proposes to use a find-and-replace script to update them without rebuilding.
- π How to start a React Project in 2024: Robin discusses the tradeoffs of starting a React project with Vite, Next.js or Astro.
- π Including static files in App Router RSCs: Shows usage of advanced Webpack features such as require.context and inline loaders.
- π Take a Qwik Break from React with Astro: Paul compares Qwik and React over various examples. βWrite code like React, Browser tastes of Vanillaβ.
- π Where do React Server Components fit in the history of web development?
- π¦ Remix-Client-Cache - using clientLoader to cache server loader data
- π¦ StyleX 0.5 - new stylex.attrs function, ESLint sort-keys rule, Babel aliases option, esbuild plugin
- π¦ React Cosmos 6 - Sandbox for developing and testing UI components in isolation - RSC support, plugin system, integrations (Vite,Webpack, Next.js, RN), Lazy Mode, MDX fixturesβ¦
- π¦ Panda CSS 0.29 - config validation, default values in patterns, media-quey tokens, color opacifierβ¦,
- π¦ React-Live-Chat-Loader 2.9 - Performant live chat integration - Add support for HubSpot/Front
- π¦ fumadocs - powerful framework for building documentation sites in Next.js
- π¦ React Bricks 4.2 - RSC support
- π¦ Redux Toolkit 2.1
- π₯ Jack Herrington - Are RSCs and NextJS Really That Bad?: compares side-by-side 3 cases where App Router has a much better DX than Page Router, and highlights how easy it is to encapsulate and distribute RSC logic inside a package.
- π₯ Nadia Makarevich - Advanced React - All about memoization in React
πΈ Sponsor
Complete User Management for React
Clerk streamlines React app authentication and user management, ensuring a quick setup for the modern web.
Experience the benefits of Clerk:
- π Pre-built UI components for sign-in, sign-up, user profiles, and organizations. Customize with any CSS library and deploy on your domain
- π¦ SDKs for React, React Native, Next.js, Redwood, Remix, and other frameworks
- β‘ Integrations with Firebase, Supabase, Convex, and other BaaS providers
- π User management, social login, magic links, MFA, and more out of the box
Dive into Clerk's quickstarts and tutorials to kickstart your projectπ
π± React-Native
This section is now co-authored with Benedikt. Feel free to send us your comments by email or on Twitter!
State of React Native 2023 - Survey Results
Iβm a big fan of all the βState of β¦β surveys, because they give us a unique insight into whatβs going on in the ecosystem. Itβs one thing to follow the hype generated on X and elsewhere, but another thing to see stats of what developers actually use. So Iβm really happy to see last yearβs State of React Native results published! And as this is now the second year this survey is conducted, we can also identify some trends by comparing the results to the year before. For all the details, have a look at the results yourself! Iβll just highlight a few things that I found interesting, some of them really surprised me:
- State management continues to be in a very interesting state (pun intended), with Redux taking the last place in retention with only 44 % (down from 57 % last year), but still clinging to second place after Reactβs native capabilities in terms of usage with 78 % (down from 85 %).
- Data fetching is a category where the results are in line with the amount of attention that can be observed on social media, with TanStack Query and tRPC taking top places in terms of interest and retention, and Metaβs own Relay staying mostly irrelevant outside of Meta with only 5 % usage.
- The future of navigation is Expo Router, which exploded from 12 % usage last year to 40 % today.
- Gauging by social media activity, styling seems to be the most talked about category with an abundance of options. In terms of usage, the classics (StyleSheet API, inline styling, styled components) remain the dominant options, with NativeWind and Tamagui catching up. Tamagui managed to generate the most interest in the past year (and also has the most retention and interest as a UI component library), closely followed by a new contender: react-native-unistyles.
- Special shoutout to Expo: In the βReact Native toolsβ section, 6 out of the top 10 tools as well as the top 2 options in the deployment category are made by Expo.
- Over 85 % of respondents think that React Native is moving in the right direction and the share of developers that find that building RN apps is overly complex right now decreased from about 30 % to 25 % - thatβs still too much, but we seem to be moving in the right direction!
Overall, really interesting results that are worth checking out in detail! Many thanks to BartΕomiej, Kacper and Software Mansion for making this happen!
- πΈ Moropo - Stop Losing Days to Detox and Build Meaningful Tests in Minutes
- π React Native 0.74 PR - Make bridgeless mode the default when the New Architecture is enabled
- π Reanimated PR - Generators support: William Candillon feels productive writing animations with generators, and contributed this new feature to Reanimated (π¦ demo)
- π Flashlight React Native performance dashboard: this uses Flashlight to measure performance all React Native versions over time. For now thereβs only one FlatList-based scenario.
- π¦ React Native visionOS - New πππππππ API coming soon to
- π Expo Docs - Using Sentry: Using Sentry with Expo got way easier in SDK 50: Now only needs one dependency (@sentry/react-native), and doesnβt require you to configure hooks in app.json.
- π Skia Docs - new Atlas component - efficiently draw a very large number of similar textures/images: Hereβs a great π¦ demo to see it in action.
- π§βπ Build and Deploy React Native Apps with Expo EAS - Free Egghead course from Expoβs Kadi Kraman
- π John Gruber - Appleβs Plans for the DMA in the European Union: Apple is introducing a host of changes to the App Store in response to demands by the EU, in a way that has by many press outlets been described as βmalicious compliance.β (also see: π Apple Developer Docs)
- π Recommended practices for React Native Testing Library in 2024: RNTL author Maciej shared tips for people that might know the library but maybe havenβt kept up with the latest changes and improvements (like screen API and semantic queries).
- π Communicating with React Native Web Views: Using web views can be a good way to reuse parts of a web app, but those parts can also feel disconnected from the native part - this article highlights how to avoid this by establishing communication between native and web.
- π Building a PhotoRoom-like background remover app with React Native and Skia
- π¦ React Native Storybook 7: After some time, RN Storybook has finally catched up to the major version of the βparent project.β
- π¦ React Native 0.73.3 - Bug fixes
- π¦ vision-camera-resize-plugin 2.0: Full rewrite to C++, much faster performance, and customizeable cropping logic
- π¦ Tamagui 1.88 - Biggest Tamagui release, brings Expo SDK 50 support, simplifies setup via new Metro plugin
- π¦ Create Expo Stack 2.4 - Starter with Expo SDK 50, Expo Router v3, NativeWind v4, Shopifyβs Restyle, and Unistyles
- ποΈ RNR 286 - Whatβs new in React Native 0.73?
- ποΈ Rocket Ship 27 - React Nativeβs Superpower with Theo Browne
- π₯ Simon Grimm - Can this replace NextJS?: Expo Router becoming an universal full-stack React framework makes it a direct competitor to Next.js.
- π₯ Theo Brown - Mobile Devs Hate Servers. Expo Wants To Fix That.
π Other
- π Some use cases for CSS revert-layer - better isolation/encapsulation than shadow DOM
- π You Probably Don't Need eslint-config-prettier or eslint-plugin-prettier
- π The Web Component Success Story
- π 12 Modern CSS One-Line Upgrades
- π Zed is now open source - Free modern Rust-based IDE
- π¦ TypeScript 5.4 Beta -
NoInfer<T>
, closure type narrowing, groupByβ¦ - π¦ Safari 17.4 beta - groupBy, withResolvers, @scope, ArrayBuffer, Intl improvements
- π¦ Qwik 1.4 - JSX types changes, automatic Link prefetching, MPA navigation fallback
- π¦ Lucia Auth 3.0 - greatly simplified lib, Oauth logic extrated to new βarcticβ package
- π¦ Shiki 1.0 beta.0 - Modern ESM syntax highlighter - merges back Shikiji into Shiki
- π¦ Adonis v6 - ESM, type-safety imrovementsβ¦
- π¦ Deno 1.40 - Temporal API, meta.filename/dirname, decorators
π€ Fun
See ya! π
Top comments (1)
Great collection of links, did not know about react cosmos! It looks really interesting, I might even use it instead of storybook for my next project π