Hi everyone!
π Back from holidays π Menorca is a really beautiful island, in particular if you like hiking close to beautiful beaches.
Way too much content to cover in 3 weeks π I'm just putting the important links for theΒ OtherΒ section, but there are some very interesting things to read there!
πΒ 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
Dan Abramov's RFC suggests to add a newΒ useEvent(fn)
Β hook in React core, without any dependency array. The unstable function/closure passed as a parameter is then stabilized (it keeps the same identity over time). This helps avoid theΒ stale closureΒ problem (when ESLint rules are not respected) while simplifying optimization viaΒ React.memo()
, and avoidingΒ useEffects
Β from re-executing. Changes planned to ESLint rules: the stabilized function does not need to be passed into other dependency arrays, and an "onEvent" / "handleEvent" convention could be adopted.
I gave myΒ positive feedbackΒ in theΒ pull-requestΒ (lots of comments there, especially on the naming of that hook). For me, it's really a missing piece in the initial hooks design, and many apps alreadyΒ use a workaround based on useLayoutEffect.
useEvent, the missing React hookΒ is a great 3 minutes video to understand the big picture.
Next.js will modernize its routing infrastructure. This will help leverage React 18 features, and other upcoming features.
They plan for incremental adoption: theΒ ./pages
Β folder continues to work as before, and you can gradually move things to a newΒ ./app
Β folder, which also activates Server Components π€―.
There will be support for nested routes/layouts based on aΒ layout.js
Β naming convention. Requests will be executed in parallel (without waterfall). This article is only the 1st part of a huge RFC: the 2nd part is coming.
Extras:
- πΒ Building a Design System from scratch: Maxime sharing all the details behind his personal ReactΒ design systemΒ , based onΒ Stitches
- πΒ Building a Mini Next.js: Jonas shows how to replicate Next.js file-system routing and SSR withΒ
getServerSideProps
, using Vite and Fastify. - πΒ Remix and "The Edge": Jim recentlyΒ joined the Remix team. This explains how Remix leverages the Edge (ie Deno and Cloudflare Workers π) to be both fast and dynamic.
- πΒ Storybook Performance: Vite vs Webpack: Storybook has pluggable builders, so which one to use? This benchmark shows that Vite does not always win against Webpack, on a large IBM Carbon 250 comps Storybook
- πΒ What the useEvent React hook is (and isn't): opinion of a Solid contributor
- πΒ Getting started with Markdoc in Next.js: Stripe just open-sourced their doc toolΒ Markdoc
- πΒ React key attribute: best practices for performant lists: good illustration on problems happening when you use index or random keys
- πΒ (P)react vs Web Components: a Xoogler's perspective
- πΒ Reading Source Code: React-Query
- πΒ You Don't Need A UI Framework
- πΒ What You Need to Do to Improve Performance in Next.js
- πΒ How to solve ReactΒ useEffectΒ infinite loops
- πΒ What I learnt at Reactathon 2022
- πΒ Using Next.js ISR with Serverless Cloud
- π₯Β Remix Conf: starts today!
- π₯ Reactathon 2022 livestreams:Β day 1,Β day 2,Β day 3
- π§βπΒ Advanced-Remix: workshop open-sourced by Kent
- π§βπΒ Complex State Management in React with Jotai and XState
- π¦Β TypeScript 4.8 + "as props": possible improvement?
- π¦Β well-named function inside useEffect
- π¦Β eslint-plugin-react v7.30: newΒ jsx-no-leaked-renderΒ rule very useful. Permits to avoid rendering a 0 withΒ
{count && <div>{count}</div>}
Β (which makes React-Native crash π ) - π¦Β Remix 1.5: officiel Deno support
- π¦Β Reagraph: WebGL Graph Visualizations
- π¦Β Playright 1.22: possible to test React components
πΈ Sponsors
π‘Β How to sponsor this newsletter
Axiom - Zero-Config Observability for Vercel
Axiom's Vercel integration provides Zero-Config Observability for your Vercel projects, covering request logging, function performance, web vitals, and product insights.
Pre-configured dashboards help you understand how your project is changing over time.
PS:Β I use it myself to monitor the newsletter signupsΒ π
Retool - Build Internal Apps Remarkably Fast
RetoolΒ is a new approach to building internal apps: we've unified the ease of visual programming with the power and flexibility of real code. Drag and drop a form together, and have it POST back to your API in minutes. Deploy instantly with access controls and audit logs.
React-Native
New version in RC. Supports the new Fabric architecture, but also the old one to help gradual adoption. Reanimated v2 code continues to work on v3, but the old Reanimated v1 API is removed. Bonus:Β demo Reanimated 3 + RNGH + Screens
Microsoft - React Native Developer Tools
Adam announces the launch of the React Native Developer Tools community project. This is a repo (rnx-kit) withΒ many useful toolsΒ for a React-Native project related to Metro, TypeScript, Jest... Microsoft already uses it on various products like Office, Xbox, and Teams.
Extras:
- πΒ Expo SDK 45: using latest React-Native 0.68.2 version. New Expo Go UI with better EAS Updates integration. Modules upgraded to JSI and Sweet API. New CLI in beta.
- πΒ Tamagui Beta: promising cross-platform tool now available in beta. Starter available using Expo, Next.js and Solito.
- πΒ React Native Accessibility - GAAD 2022 Update
- π₯Β It's Severance, but in React Native: latest William Candillon video with Skia, Perlin Noise and shaders. As good as theΒ TV show. Remotion intros/outros are backπ
- ποΈΒ TheΒ React NativeΒ Show - Coffee Talk #2 - Top Resources for Developers
- ποΈΒ RNR 234 - React Native Tips and Tricks
- ποΈΒ RNR 235 - Dissecting React Native 0.68
- ποΈΒ RNR 236 - Reanimated 2 with Krzysztof Magiera
- π¦Β 6 Expo 45 clones: Spotify, Uber, Netflix, Slack, Twitch, Disney+
- π¦Β Tesla app using React-Native
- π¦Β React-Native 0.69: faster & ~5% less RAM usage
Other
- JavaScript Containers
- A Community Group for Web-interoperable JavaScript runtimes
- Google I/O 2022 Recap
- Interaction to Next Paint (INP)
- State of CSS 2022
- TypeScript 4.7 RCΒ +Β TypeScript 4.8 Iteration Plan
- Stripe: Migrating millions of lines of code to TypeScript
- Deno 1.22 Release Notes
- Lerna is dead --- Long Live Lerna
- Transferring Jest to the OpenJS Foundation
- Flutter 3
Top comments (1)
Perfect!