前端周热点106: Remix, Framer Motion, Storybook, Gatsby, Remotion, Metro, Lerna

440 阅读3分钟

React

React Router v6.4.0-pre.2

Remixing React Router已经宣布:许多Remix抽象(action, loader...)将被添加到React-Router。这是在6.4版本,目前是预发布(pre-release)版本。新的数据API的文档已经可以使用。

Should you use Framer Motion or Motion One?

Matt是许多流行动画库的作者。他以一种细微的方式解释了声明式和命令式模型之间的区别。大多数React开发者应该使用声明式的Framer Motion库。Motion One是一个轻量级、低层次的命令式库,希望成为 "JQuery的网络动画API"

拓展阅读

React-Native

React and React Native finally feel the same

Jay解释了当今网络/移动跨平台的3个主要挑战:样式、动画、导航。他建议使用Tailwind-React-Native和他新的跨平台动画库。 Legend Motion依赖于与Framer Motion(仅限网络)相同的API。该文件简要解释了与另一个类似解决方案Moti类似解决方案Moti的区别

拓展阅读

  • 📦 Tailwind-React-Native: looks nice to use Tailwind in a cross-platform way. Mobile: className + Babel plugin. Web: just forwarding the className to a React-Native-Web element.
  • 📦 React-Native-Esbuild: to very easily replace Metro with esbuild and compile much faster. A few limitations to consider: no Hermes nor Fast Refresh.
  • 🎙️ RNR 237 - React Native on Desktop

Other

Airbnb - Faster JavaScript Builds with Metro

Airbnb的构建和热重载时间直线上升。他们决定用Metro (React-Native捆绑器🤯)取代Webpack,并看到了明显的改善。这篇文章强调了这两个捆绑器之间的一些架构差异,以及在这次迁移中遇到的挑战。注意:Stripe也使用Metro🤔。

How Lerna just got 10x faster!

Nwrl(Nx背后的公司)刚刚接管了未维护的单版本工具Lerna的领导权。他们已经发布了一个v5.0,并开始将Nx集成到Lerna 5.1-beta中,作为一个可追溯的选项。一个简单的Lerna配置 useNx: true,你的构建就会立即变得更快。

拓展阅读

joke

订阅原文: