You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Profiler`measures how often a React application renders and what the "cost" of rendering is.
10
-
Its purpose is to help identify parts of an application that are slow and may benefit from [optimizations such as memoization](https://reactjs.org/docs/hooks-faq.html#how-to-memoize-calculations).
> Profiling adds some additional overhead, so **it is disabled in [the production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)**.
A `Profiler`can be added anywhere in a React tree to measure the cost of rendering that part of the tree.
22
-
It requires two props: an `id` (string) and an `onRender`callback (function) which React calls any time a component within the tree "commits" an update.
Time spent rendering the `Profiler`and its descendants for the current update.
102
-
This indicates how well the subtree makes use of memoization (e.g. [`React.memo`](/docs/react-api.html#reactmemo), [`useMemo`](/docs/hooks-reference.html#usememo), [`shouldComponentUpdate`](/docs/hooks-faq.html#how-do-i-implement-shouldcomponentupdate)).
103
-
Ideally this value should decrease significantly after the initial mount as many of the descendants will only need to re-render if their specific props change.
Timestamp when React began rendering the current update.
108
+
現在の更新のレンダーを React が開始した時刻に対応するタイムスタンプ。
109
109
***`commitTime: number`** -
110
-
Timestamp when React committed the current update.
111
-
This value is shared between all profilers in a commit, enabling them to be grouped if desirable.
110
+
現在の更新を React がコミットした時刻に対応するタイムスタンプ。
111
+
必要に応じてグループ化できるよう、1 コミット内のすべてのプロファイラ間でこの値は共有されます。
112
112
***`interactions: Set`** -
113
-
Set of ["interactions"](http://fb.me/react-interaction-tracing)that were being traced the update was scheduled (e.g. when `render` or `setState` were called).
0 commit comments