前端爱好者周刊 (Github: shfshanyue/weekly),每周记录关于前端的开源工具、优秀文章、重大库版本发布记录等等。每周一发布,订阅平台以下,欢迎订阅。前端
封面

包含了从初级到高级有关 React 生态的学习路线图,图片出自 roadmap.shvue
一句话
- 在 Chrome 中打开开发者总局,<Ctrl+Shift+P> 搜索 Full Size,可截屏网页滚动长页面
- Deno & Node.js 做者 Ryan Dahl 和联合创始人 Bert Belder 宣布成立了 Deno 公司
- vue3 将再也不支持 IE11,原定投入 Vue 3 IE11 支持的精力将投入给 2.7
- 最新数据显示,截至2021年2月底,我国公募基金管理规模达到21.78万亿元
开发利器

可视化 SVG,并支持压缩图片、转化为 React/RN 组件、转化为 png 格式的图片等node

把 SVG 转化为 DataURI,并嵌入到 CSS 样式中react
文章推荐
当图片加载失败后,咱们能够使用 DataURI 做为一个友好的兜底方案。可是仍有许多复杂的状况,能够看这篇文章了解一下。git
代码片断
1、 如何把一个数组随机打乱?
使用原生实现,Math.rondom() - 0.5 有时大于0,有时小于0会达成这样的效果github
[1, 2, 3, 4].sort((x, y) => Math.random() - 0.5)
借用 lodash
可更方便npm
_.shuffle([1, 2, 3, 4])
//->
开源与库

一个 tooltip 工具,可在 React 中使用,支持多达几十种丰富的选项。json
版本发布
We are excited to introduce Next.js 10.1, featuring:数组
- 3x Faster Refresh: 200ms faster refresh with no changes necessary.
- Improved Installation Time: 58% smaller install size and 56% fewer dependencies.
- next/image Improvements: Apple Silicon (M1) Support, plus more layout and loader options.
- Next.js Commerce Shopify Integration: Flexible data layer for composable e-commerce apps.
- Custom 500 Page: Add your own logo and branding to error pages.
- Strict PostCSS Configuration Loading: Improved caching with Webpack 5.
- Support for extends in tsconfig.json: Extensible configuration for large TypeScript apps.
- Detect When Preview Mode Is Enabled: Conditionally show content when viewing previews.
- Router Methods Scroll to Top: Automatically scroll to the top, now consistent for all routing.
- Documentation Improvements: Incremental adoption, migration, and Docker deployment.
在 Node 中也支持了 btoa 与 atob 了app
buffer:
- implement btoa and atob (James M Snell) #37529
deps:
doc:
- add legacy status to stability index (James M Snell) #37784
- add @linkgoron to collaborators (Nitzan Uziely) #37817
http:
- add http.ClientRequest.getRawHeaderNames() (simov) #37660
主要集中在对 workspaces 支持的加强
FEATURES
- 8bcc5d73f #2972 feat(workspaces): add repo and docs (@wraithgar)
- ec520ce32 #2998 feat(set-script): implement workspaces
- 32717a60e #3001 feat(view): add workspace support (@wraithgar)
- 7b177e43f #3014 feat(config): add 'envExport' flag (@isaacs)
BUG FIXES
- 4c4252348 #3016 fix(usage): specify the key each time for multiples (@isaacs)
- 9237d375b #3013 fix(docs): add workspaces configuration (@wraithgar)
- cb6eb0d20 #3015 fix(ERESOLVE): better errors when current is missing (@isaacs)