React
Astro是一个现代元框架,能够使用任何UI库(包括React)。它现在支持服务器端渲染,在v1.0 beta测试版中可以实验。与Remix一样,该框架提供了一个 adapters层,用于部署到多个目标。
React-admin V4: Build Your Own Framework
François以React中一个简单的管理界面为例,该界面基于MUI和React-Hook-Form。这段代码最初是相当冗长的,有90行。他通过抽象和复用,重构了这段代码,最终实现相同的效果只用了20行代码。
他解释说,这些抽象实际上是React-Admin的第四版(v4.0.0-RC.1)。这个新版本基于更现代的堆栈,并且更加模块化:它暴露了高级组件(默认基于MUI,可以交换),但也有低层单元来创建你自己的框架。v4的全部系列文章。
An Overlooked Factor For Performance Optimization In React
Interesting reflection on the need (or not) to memoize the value of a React context according to the position of the provider in the tree. Personally, I still prefer to always memoize for safety, as you never know if the provider will not be moved somewhere else.
关于是否需要(或不需要)根据provider在树中的位置来记忆React上下文的值的有趣的思考。就个人而言,为了安全起见,我还是倾向于总是记忆化,因为你永远不知道提供者是否会被移到其他地方。
Writing Redux Reducers in Rust
通过WebAssembly将现有的Rust业务代码整合到React应用中,以及遇到的挑战:非理想的绑定,序列化WASM桥梁等场景的反馈。他们需要在两边(Rust和TypeScript)访问相同的状态。解决方案:在Rust中创建还原器,并向TypeScript返回一个状态差异。
How to Create and Export Web Components From a React Application
展示了如何使用React来创建一个Web组件。它看起来比较简单,在一些特定的情况下🤔可能会很有用。不要与React的Web Components的使用相混淆(以后将正式支持)。
React components composition: how to get it right
Gives some hints on when/how to split into smaller subcomponents. Also evokes an important Clean Code principle (without naming it): Single Level of Abstraction.
对何时/如何分割成更小的子组件给出了一些建议。也唤起了一个重要的清洁代码原则(没有命名它)。单一层次的抽象。
拓展阅读:
- 🧵 React 18 + TypeScript: typings released with necessary breaking changes. In particular the TypeScript type for
React.FC
does not includechildren
anymore. Also check Removal Of Implicit Children, and this codemod to migrate. - 📜 Test component interactions with Storybook: complete guide to create and execute interaction tests in Storybook stories thanks to the
play()
function. - 📜 How to easily reduce your NextJS bundle size by 30%? feedback, quantified impact of 4 actions relatively easy to implement. Using dynamic imports provides the best ROI.
- 📜 React 18 Quick Guide & Core Concepts Explained: good React 18 major changes summary.
- 📜 Redwood Startup Fund: follow-up of last week's Redwood 1.0 Launch Week
- 📜 Bad Habits of Mid-Level React Developers
- 📜 Improving Web Performance with React Hydration Strategies
- 💡 Gatsby RFC: New Bundler in Gatsby: may incrementally adopt esbuild according to current benchmarks?
- 💡 Gatsby RFC: Script component: similar component to the Next.js one, with a possible Partytown integration?
- 💡 Redux deprecate createStore?
- 💡 Remix deferred API?
- 🐦 React + TypeScript: no need to import React event handler types
- 🐦 React 18 +
React.lazy()
+ Suspense + SSR: only works with new APIs SSR, notrenderToString
. - 🎥 RedwoodJS Intro by Tom Preston Werner
- 🎥 React Jargon Explained: What is Concurrent React?
- 📦 React-Native-Storybook-Starter: with mobile + React-Native-Web support
- 📦 Capacitor-Remix-Templates
- 📦 Remix + Crystallize eCommerce Starter
- 🎙️ StackOverflow #430: The new version of React...
React-Native
- 🐦 Expo: Evan Bacon automating Android app deployment: want to go further than Fastlane and allow deploying a new app without any manual step on the Play Store UI (first submission).
- 🐦 React-Native-{Bootsplash,Localize,Permissions}: looking for sponsors to support Fabric
- 📦 React-Native-Bignumber: performant Fabric/JSI big number lib
- 📦 React-Native-Purchase: claims to work with all Expo workflows
- 🎙️ React Native Radio 231 - Using Flipper's Flamegraph Tool
其它
Announcing TypeScript 4.7 Beta
Another great TypeScript release! The long-awaited ES Modules support and package.json "exports" which allows to create several entry points for the same Node.js package. Many other improvements and new features, including "moduleSuffixes" useful for React-Native.
又一个伟大的TypeScript版本! 期待已久的ES模块支持和package.json "exports",允许为同一个Node.js包创建多个入口点。许多其他改进和新功能,包括对React-Native有用的 "moduleSuffixes"。
拓展阅读:
- Announcing Rome Formatter: broken link in last edition 😅 Rome offers a code formatter written in Rust. Mostly compatible with Prettier, but 9-12x faster, and able to format invalid code!
- Node v12.22.12: last v12 LTS
- JavaScript Testing Best Practices: updated and translated
- Prevent the introduction of known vulnerabilities into your code: new action GitHub to review PR dependency changes and prevent supply-chain attacks. Seems easy to setup.
- New to the web platform in March: good overview
- Devs For Ukraine: conf 25-26 April
- TypeScript / How the compiler compiles
- TypeScript type-level parser
- Make the TypeScript interface partially optional/required
- Principles of Object-oriented Programming in TypeScript
- TypeScript things I wish I knew earlier
- ECMAScript proposal "Change Array by copy": four new non-destructive Array methods
- Safari Technology Preview 143
- Safari 15.5 Beta Release Notes
- The "inert" attribute is finally coming to the web
- CSS :has( ) A Parent Selector Now
- ShadowRealms -- an ECMAScript proposal for a better
eval
- What's new in ECMAScript 2022
- AST Explorer SWC support
- How Tailwind CSS came to be feat
- Nx 13.10 + Nx 15 Roadmap
- Turborepo 1.2
- Parcel CSS 1.8
- ESLint v8.13
- StackBlitz $7.9M Seed Round
- Prisma Adds Support for MongoDB
- 4 ways we use GitHub Actions to build GitHub
- The Next Google
- With 3 months left before IE retirement, new enhancements arrive in Microsoft Edge for IE mode

订阅原文: