Skip to content

Commit

Permalink
merging all conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
reactjs-translation-bot committed Apr 12, 2021
2 parents 36086df + 968f091 commit 371f028
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/blog/2020-10-20-react-v17.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ React v17 支持了[全新的 JSX 转换](/blog/2020/09/22/introducing-the-new-j

## React Native {#react-native}

<<<<<<< HEAD
React Native 会有一个单独的发布计划。目前,我们预计对 React v17 的支持会在 React Native 0.65 中落地,但具体版本可能会有出入。你可以在 React Native 社区的发布 [issue tracker](https://github.com/react-native-community/releases) 上参与讨论。
=======
React Native has a separate release schedule. We landed the support for React 17 in React Native 0.64. As always, you can track the release discussions on the React Native Community releases [issue tracker](https://github.com/react-native-community/releases).
>>>>>>> 968f09159512b59afd5246a928789ae52592c923
## 安装 {#installation}

Expand Down
13 changes: 13 additions & 0 deletions content/docs/optimizing-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ module.exports = {

请注意,你只需要在生产构建时用到它。你不需要在开发中使用 `TerserPlugin` 插件,因为这会隐藏有用的 React 警告信息并使得构建速度变慢。

<<<<<<< HEAD
## 使用 Chrome Performance 标签分析组件 {#profiling-components-with-the-chrome-performance-tab}

**开发**模式下,你可以通过支持的浏览器可视化地了解组件是如何 挂载、更新以及卸载的。例如:
Expand Down Expand Up @@ -183,6 +184,9 @@ module.exports = {
目前只有 Chrome、Edge 和 IE 支持该功能,但是我们使用的是标准的[用户计时 API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API)。我们期待有更多浏览器能支持它。

## 使用开发者工具中的分析器对组件进行分析 {#profiling-components-with-the-devtools-profiler}
=======
## Profiling Components with the DevTools Profiler {#profiling-components-with-the-devtools-profiler}
>>>>>>> 968f09159512b59afd5246a928789ae52592c923
`react-dom` 16.5+ 和 `react-native` 0.57+ 加强了分析能力。在开发模式下,React 开发者工具会出现分析器标签。
你可以在[《介绍 React 分析器》](/blog/2018/09/10/introducing-the-react-profiler.html)这篇博客中了解概述。
Expand All @@ -199,7 +203,16 @@ module.exports = {
>`react-dom` 的生产分析包也可以在 `react-dom/profiling` 中找到。
>通过查阅 [fb.me/react-profiling](https://fb.me/react-profiling) 来了解更多关于使用这个包的内容。
<<<<<<< HEAD
## 虚拟化长列表 {#virtualize-long-lists}
=======
> Note
>
> Before React 17, we use the standard [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) to profile components with the chrome performance tab.
> For a more detailed walkthrough, check out [this article by Ben Schwarz](https://calibreapp.com/blog/react-performance-profiling-optimization).
## Virtualize Long Lists {#virtualize-long-lists}
>>>>>>> 968f09159512b59afd5246a928789ae52592c923
如果你的应用渲染了长列表(上百甚至上千的数据),我们推荐使用“虚拟滚动”技术。这项技术会在有限的时间内仅渲染有限的内容,并奇迹般地降低重新渲染组件消耗的时间,以及创建 DOM 节点的数量。

Expand Down

0 comments on commit 371f028

Please sign in to comment.