大家好!
又是一周,有很多很酷的发布,如Reassure、FlashList或Bun 🤯
React
Reassure是一个新的React性能测试库。之前已经介绍过了,现在已经由Callstack开源了。它允许在检测到性能退步时在pull-request中发布一个报告。例如:一个组件的重现速度较慢,或比以前更频繁。目前只支持React-Native,但web端很快也会支持。
How to animate multiplayer cursors
一篇很好的互动文章,建议在几个浏览器上实时地对鼠标光标进行动画处理。这是个比看起来更复杂的问题。每种方法都用React实现来说明,并使用了不同的策略:CSS过渡、弹簧、样条......
来自同一作者的互动文章,介绍了许多中间件的使用案例。这篇文章已经发表在这里,刚刚在Next.js 12.2正式发布后进行了更新,其中包括一些突破性的变化。
Sacha Grief(《Discover Meteor》的合著者,也是《JS状态》、《CSS调查》......的作者)回顾了他个人与这个框架的10年历史。Meteor已经失去了知名度,但仍然被使用,并且极大地影响了我们的前端生态系统。
The mystery of React Element, children, parents and re-renders
Nadia强调了一些可能令人惊讶甚至反直觉的React行为,并解释了在哪些情况下,父方的重新渲染会触发子方在各种边缘情况下的重新渲染。
Storybook Community Showcase #2
来自Storybook社区的最新消息摘要。组件百科全书、Figma插件、Story Explorer和各种附加组件。变体、CSS变量、Recoil...
The new wave of React state management
介绍了状态管理库需要解决的不同问题,并对其中一些问题进行了比较。前/后Redux的回顾。完整的文章,但相当长:不容易阅读。
拓展阅读
- 📜 Deploy Next.js 12.2 on Netlify today: Next.js latest edge features can run on Netlify too
- 📜 Use Next.js 12.2 On-Demand ISR to automatically refresh stale data
- 📖 Thinking in Efffects: new doc page, work-in-progress
- 🐦 Remix + Svelte
- 🐦 Astro Preact compat option
- 🎥 A Fresh new web framework is out
- 📦 FramerMotion 6.4: new hook useInView()
- 📦 TanStack Table v8: new React-Table version is now framework-agnostic and also supports Svelte, Solid, Vue
- 📦 storybook-addon-docusaurus
React-Native
FlashList - Fast & Performant React Native List
Shopify刚刚发布了FlashList,它是FlatList的替代品,以解决滚动时的性能问题,避免显示空单元格。目标是即使在低端Android设备上也能保持60fps,而不使实现复杂化。该库重用了已经渲染好的单元格:你必须调整你对React key的使用,让它来接管。
全面列出了每个React-Native运行时(JSC、V8、Android...)的API支持。作者还解释了 为什么React Native推荐TS配置库。"es2017"
拓展阅读
- 📜 What's New in React Native 0.69 --- How to Upgrade and Why it Matters
- 🧵 Expo 46 + web: Evan Bacon gives details about changes in web support and also confirms the ambition to replace Webpack by Metro.
- 🧵 React-Native vs mobile native trends: the development of native apps seems to decrease.
- 🐦 FlatList vs FlashList perf comparison
- 🐦 React-Native vs Flutter diagram
- 🐦 Webpack Module Federation + React Native
- 🎙️ RNR 241 - Redux Toolkit vs MobX-State-Tree Showdown
- 🎥 The React Native Avengers: GestureHandler, Reanimated, and Skia
Other
Bun - an incredibly fast all-in-one JavaScript runtime.
一个新的JavaScript运行时,在性能上直接与Node.js和Deno竞争,基于JSC(不是V8),用Zig编写。一个完整的工具链,包括捆绑器、转译器、包管理器,甚至测试运行器。我们去年已经谈到了Bun捆绑器,但范围已经扩大到更大的东西,0.1版本刚刚发布。
拓展阅读
- Safari Technology Preview 148: :has(), Container Queries, inert...
- New to the web platform in June
- Color.js: A library that takes color seriously
- Faster page loads using server think-time with Early Hints
- The end of Internet Explorer
- TransformStream is now supported cross-browser
- wasmbuild - Using Rust in Deno and Web Apps
- CSS Cascade Layers -- There's a Polyfill for That!
- CSS - Breaking Out of a Central Wrapper
- Vue 2.7 "Naruto"
订阅原文: