๐จ #172: Next.js, PPR, Remotion, State of React Native, Parcel, Panda, StyleX, Cosmos, Remix, RTK, TypeScript, Skia, Reanimated, RNTL, Storybook, Flashlight, Tamagui...
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!
๐ก Check this newsletter on Twitter - visual format ๐จ
To support me:
- ๐ Recommend the newsletter to your friends: it really helps!
- ๐ธ Sponsor the newsletter
- ๐งต Retweet the latest Twitter thread
Don't miss the next email!
๐ธ 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
Don't miss the next email!
๐ธ 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! ๐
Don't miss the next email!