This Week In React #102: Lexical, Mitosis, Remix, Next.js, Redux, Storybook, TurboModules, Node 18, HTTP 103, CSS :has()...

Search for a command to run...

No comments yet. Be the first to comment.
Hi everyone! Krzysztof and Tomasz from Software Mansion here 👋 It's been a fairly calm week for the React ecosystem, but not for the React Native world. Meta has made an exciting announcement about the release of React Native 0.80, where they've dec...

Hi everyone! This week is relatively calm in the React ecosystem, but we still have various interesting blog posts and releases. Maybe we'll soon get some exciting news from React Summit that's about on Friday! On the React Native side, all the devs ...

Hi everyone! I thought I was on schedule for today's issue, until I realized that Dan Abramov wrote 4 RSC blog posts this week 😂. We also get great releases, including Storybook, LiveStore, Base UI, and the Lingo Compiler is a quite exciting innovat...

Hi everyone! Cyril and Matthieu from Theodo Apps here 👋. This week, the Remix team announced some big news. Microsoft has also made it easier to try out TypeScript Go rewriting. In the React Native world, there were a few minor but interesting relea...

Hi everyone! This week, we're delighted to finally have a preview of React Server Components support in React Router. I've also found some very interesting PRs on the React repo, and give you a glimpse of what could be coming soon! The React Native e...

Hi everyone!
Lexical seems to be a modern alternative to Draft.js.
Redux invites us more than ever to adopt Redux Toolkit.
Many libraries provide support or better compatibility with React 18.
React-Native: the adoption of the new architecture is well underway, with several early adopters releasing TurboModule-related libs and content.
The web platform continues to improve, and Node 18 improves its compatibility with standards by adding the fetch() API.
🙏 Support the newsletter:
If you like this newsletter, subscribe in priority there:
New open-sourced lib by Meta for creating extensible text editors (with a system of plugins to support mentions, hashtags, collaborative editing...). It seems to be a modern, lightweight alternative to Draft.js (no need to use ImmutableJS this time 😏). Doesn't specifically depend on React, but provides an official binding. Can be used by other frameworks and could even target other plateforms (iOS support planned)
Mitosis is a tool that allows you to create a design system with a dialect close to React/JSX (inspired by Solid). Mitosis is able to compile these components to various frameworks (React, Angular, Svelte, React-Native...). This can be handy for large companies that use multiple frameworks over time. This official article is a good introduction.
Multiple forms per route in Remix
Explains how to manage 2 forms associated with the same Remix route. It's only possible to have one ActionFunction per route, so the best solution seems to be to use the action attribute on the submit button.
A good overview of some accessibility principles in a React context: description of aria-* props and their impact on screen readers, color, focus ring...
Storybook Lazy Compilation for Webpack
The upcoming Storybook 6.5 will include performance improvements to improve the local DX through lazy compiling stories: 3x faster startup, 2x faster rebuild. The impact seems significant for larger Storybooks. Compare with Ladle, an alternative to Storybook released recently that also tries to improve performances.
Extras:
createStore deprecated with a warningCSS has a new :has() selector, often referred to as a "parent selector", which allows CSS rules to be applied to a parent element based on children. For example, you can change the parent layout of a card, but only if it contains an image element: this avoids having to apply a variant class on the parent. This article illustrates this new feature with many use cases. I found interesting the possibility of applying CSS variables on <html> according to the value of a <select> (useful demo for theming or dark mode support). Currently only available in Safari and Chrome Canary, but support could improve fast.
Be careful not to abuse it: in a component model like React, it is better to limit yourself to targeting local classes to avoid breaking the encapsulation model of your component.
New 103 HTTP Status Code (Early Hints)
A new status code is officially added in the HTML spec. It allows sending "early hints" to the browser to prefetch/preload resources before receiving the 200 response from the server. It seems useful particularly for CDNs (read this Cloudflare article) which will be able to send cached early hints (or even predicted through machine-learning 🤯) while fetching fresh content from the origin server.
With <dialog> added in Safari 15.4 and growing support, it's time to take a look at this new element. Adam Argyle offers us a fairly complete article on the subject: based on the most modern web APIs, he implement a mega/mini modals with animation, accessibility, responsive, light dismiss, custom events...
Extras:
fetch(), Web Streams, a test runner... 