Hi everyone!
Lots of things happened during my ski holiday π
We cover React 18, React-Native 0.68, and 2 weeks of full of news.
Short intro, no more space in the email π we'll party another time to celebrate the 100th edition π€ͺ
πΒ Support the newsletter:
- πΒ Recommend it to your friends: it really helps!
- πΈΒ Sponsor This Week In React
- πΒ Write testimonials on Twitter
- π§΅Β Retweet the latest Twitter thread
- π¨Β Reply to thisΒ email:Β feedback is welcome
- π₯ Follow onΒ LinkedIn
If you like this newsletter, subscribe in priority there:
- π¬π§Β ThisWeekInReact.com
- π«π·Β ReactHebdo.fr
React
React 18 freshly released! This new version offers many improvements and APIs that we have already talked about: automatic batching, SSR streaming, Suspense, selective hydration, new hooks (useId
,Β useDeferredValue
,Β useTransition
...)
This highly anticipated release also featuresΒ Concurrent React. Rendering is no longer necessarily synchronous and atomic: it can be interrupted, paused and resumed... This allows to cut up the work in small slices with different priorities, and keep the interface responsive.
These concurrent features can be used today, but are mainly intended to be encapsulated inside a library or a framework (integrations planned inΒ Remix,Β Next.js...).
This new renderer can produce breaking, and will only activate when using the new concurrent features of React 18, which allows for smooth incremental adoption. Upgrading React to v18 should therefore not be too complicated. If your app has problems in dev, it isΒ advised to disable StrictMode.
Bottom Line:Β React 18 lays a new foundation, and most innovations are yet to come. Dan Abramov even calls this release anΒ MVPΒ whose goal seems to essentially facilitate the gradual adoption of Concurrent React. Some likeΒ Paul HenschelΒ (React-Three-Fiber) orΒ James IdeΒ (Expo) already predict the some huge performance impacts.
I think we are entering a new era. Some web frameworks such as Svelte or Solid are becoming popular due to their simplicity and performances. Unlike React, they are truly responsive and virtual DOM free.
React's virtual DOM comes has a cost, but I think Concurrent React can hardly be implemented without this abstraction.With React 18+, we will finally know if this cost is worth being paid. It will be interesting to compare the UX, DX and performances of React against Svelte or Solid in the years to come.
It'sΒ Launch WeekΒ for Redwood, with v1.0 just released, and another big announcement scheduled for Thursday. This React meta-framework inspired by Ruby on Rails has stronger opinions than its competitors, and can help you ship a product faster with its opinionated integration with Prisma, GraphQL, Storybook, TypeScript, Jest... Its creator, Tom Preston-Werner (also creator of GitHub, Jekyll...) isΒ financing the framework himself with $1M over the next yearΒ in a sustainable way (no VC)
The Remix and React-Router repos will merge under the name Remix, and many features present in Remix will be made available in React-Router: data loading, mutations, interrupts, revalidation, race-conditions... These abstractions are thought to work best with Suspense and theΒ "render-as-you-fetch"Β pattern.
Extras:
- πΒ Remix: The Yang to React's Yin
- πΒ Improving Web Page Performance at DoorDash Through Server-Side Rendering with Next.JS: great feedback of a complex migration at scale
- πΒ Hooks Considered Harmful
- πΒ When Does React Render Your Component?
- πΒ SSR Date Formatting in Remix using the User's Locale
- πΒ How Does Shallow Comparison Work In React?
- πΒ Trying out Ladle - A Storybook Alternative
- πΒ Why React 18 Broke Your App
- π¦ React core team:Β Brian Vaughn leaves,Β Mengdi Chen enters
- π¦Β useId() + React keys?Β β
- π¦Β useDeferredValue mental model: "like debounce but React decides when to bounce"
- π¦Β JSX && conditionals: pitfalls to know! There are ESLint plugins for that (1,Β 2)
- π¦Β Next.js + Partytown "worker"
- π¦Β React + Qwik
- π₯Β The Story of Next.js
- π¦ React-Three-Fiber:Β v8.0Β (with*Β React-Native support!*) +Β Babel plugin
- π¦Β React Router v6.3.0: compatibility v5
- π¦Β React Testing Library v13
- π¦Β React-Query v4.0.0-beta.1
- π¦Β Chicane v1.0
- π¦Β Gatsby v4.11
React-Native
Very important release, since it is the first version of React-Native offering to easily activate theΒ new architectureΒ (Fabric and TurboModules) through a flag.
The next version of Expo (SDK 45)Β should be based on v0.68, but the new architectureΒ won't be available immediately in Expo GoΒ (but could probably be enabled in custom dev clients)
Extras:
- π¦Β TypeScript moduleSuffixes: improves integration between TypeScript and React-Native extensions (
Comp.ios.tsx
) - π¦Β React Native for Web 0.18 preview
- πΒ Deep dive into React Native JSI
- πΒ Ionic vs. React Native: Performance Comparison
- πΒ How do you cache FlatList.renderItem?
- π₯ React-Native-Skia:Β NeumorphismΒ +Β Gen-Z mode
- ποΈΒ React Native Radio 230 - We React to News
- ποΈΒ React NativeΒ Show 12 - Mobile Payments in React Native
- π¦Β Nx Expo Support
- π¦Β OneSignal Expo Plugin
- π¦Β React-Native-Google-SignIn Expo Plugin
Other
Updates from the 89th TC39 meeting
Huge TC39 update! My highlights:
- Decorators stage 3, on track to finally land!
- Change Array by Copy in stage 3: immutable methods on JS arrays! Also anΒ important stepΒ step forΒ Records & TuplesΒ to progress.
- Type annotations stage 1 π€―
- Intl.MessageFormat in stage 1: could reduce bundle size of apps using React-Intl.
Extras:
- A Built-in Test Runner Is Coming to Node and Why You Should Care: new out-of-the-box test runner in Node.js 18! π€―
- Release Notes for Safari Technology Preview 142: CSS Container Queries!
- From Static to Interactive: Why Resumability is the Best Alternative to Hydration: interesting model used by Qwik
- Announcing Rome Formatter
- How to Write TypeScript Like a Haskeller
- Conquering JavaScript Hydration
- How return await can slow down your code
- Optimising Core Web Vitals on SPAs
- Cache and Prizes - Serious Platforms Don't Play Favourites
- TypeScript Optional variance annotations
- TS Pattern v4.0
- Boxed: Functional utility types and functions for TypeScript
- Types as comments: Strong types, weakly held
- The Ultimate TypeScript Thread
- WebContainers are out of beta in Chromium
- Parcel v2.4.0
- Vite 2.9
- Understanding CSS Layout Algorithms
- Picture perfect images with the modern img element
- Those HTML Attributes You Never Use
- Dum: npm script runner in Rust
- Storybook Figma plugin beta
- What's new in Node.js core? March 2022 edition
- Astro 1.0 Beta Release
- 14 Linting Rules To Help You Write Asynchronous Code in JavaScript
- Node.js community update
- GraphQL Yoga 2.0
- Electron v18.0
Top comments (0)