This Week In React #103: Contentlayer, Remotion 3, Stale Closure, Cross-platform, Jest 28, Hydration, Netlify Edge Functions...

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!
Great releases this week: Contentlayer, Remotion 3, Jest 28, Netlify Edge Functions...
A good diversity of React articles, including 2 related to cross-platform, a subject that interests me very much.
🙏 Support the newsletter:
If you like this newsletter, subscribe in priority there:
Contentlayer: Content Made Easy for Developers (beta)
Contentlayer is a new system that offers to manage the glue between your content (Markdown, CMS, Notion...) and your code. You define a schema, and it will validate/compile your content and efficiently generate a .contentlayer folder with TypesScript types, and the content ready to be imported directly into your app. This seems to improve build performance significantly (up to x2 even even with cold caches). The beta has an official Next.js integration reduces the amount of glue code. I recommend watching the intro intro video (5min) to understand how it works in a Next.js context. A new project by Johannes Schickling, also creator of Prisma, also working on the glue between code and DB.
Remotion allows you to create videos programmatically, with React (web) code and data/props. After 10 months of development, v3.0 has just been released (trailer) and the main new feature is the new support for serverless rendering on AWS Lambda, which allows you to scale, reduce costs, and produce videos much faster!
Hooks, Dependencies and Stale Closures
Interactive article to help fully understand the stale closure problem in React. If you use memoization and do not respect the ESLint exhaustive-deps rule, you risk introducing this type of problem in your codebase, and it is not always easy to debug!
The challenges of rendering an OpenLayers map in a popup through React
An interesting feedback on rendering a React app in several windows via portals. There are advantages (a single state to control all the windows) but also some challenges to solve.
Extras:
<span>, <h1>...next/link will no longer require <a> as a child: looks like a nice quality of life improvement 😉Migrating React And Native Apps To React Native
Callstack engineers explain how to adopt React-Native for an existing app, with 2 different approaches: greenfield (full rewrite) and brownfield (incremental migration). Also evokes how to port a web application to React-Native.
Writing cross-platform components for web and React Native
Artem gives some ideas for cross-platform web/mobile development. He suggests using primitive components, and taking a web-first approach for DX reasons: developing in the browser and testing with Cypress, then verifying that the mobile app works.
Extras:
Jest 28: Shedding weight and improving compatibility
Lots of cool things in this release! My highlights:
"exports"Christoph Nakazawa explains how to create a JavaScript bundler, based on some existing Jest packages. Reading JavaScript files, creating the dependency graph, the bundle runtime, final bundle assembly... A technical reading that greatly demystifies the internal workings of a simple bundler.
After a failed attempt (Edge Handlers), Netlify releases a new serverless @ Edge offer with its Edge Functions in beta, based on the Deno Deploy infrastructure, and thus more compatible with web standard APIs. This allows in particular to run React meta-frameworks using server-side code more optimally: Remix, Next.js (only middleware for now), Hydrogen, Server Components, Astro...
The creator of Qwik/Angular continues to question the hydration model of our server-side rendered SPAs, and pushes to adopt another more efficient model, based on "resumability".
Extras:
