Packages

object Profiler

The Profiler measures how often a React application renders and what the "cost" of rendering is. Its purpose is to help identify parts of an application that are slow and may benefit from optimizations such as memoization.

See https://reactjs.org/docs/profiler.html

Since

React 16.9.0 / scalajs-react 1.7.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Profiler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Interaction(id: Int, name: String, timestamp: Double) extends Product with Serializable
  2. final case class OnRenderData(id: String, phase: String, actualDurationMs: Double, baseDurationMs: Double, startTime: Double, commitTime: Double, rawInteractions: Iterable[facade.Interaction]) extends Product with Serializable

    Data returned by the Profiler.

    Data returned by the Profiler.

    id

    The id prop of the Profiler tree that has just committed. This can be used to identify which part of the tree was committed if you are using multiple profilers.

    phase

    Identifies whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or hooks.

    actualDurationMs

    Time spent rendering the Profiler and its descendants for the current update. This indicates how well the subtree makes use of memoization (e.g. React.memo, useMemo, shouldComponentUpdate). 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.

    baseDurationMs

    Duration of the most recent render time for each individual component within the Profiler tree. This value estimates a worst-case cost of rendering (e.g. the initial mount or a tree with no memoization).

    startTime

    Timestamp when React began rendering the current update.

    commitTime

    Timestamp when React committed the current update. This value is shared between all profilers in a commit, enabling them to be grouped if desirable.

    Annotations
    @nowarn()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[F[_], A](id: String, onRender: (OnRenderData) => F[A])(children: vdom.PackageBase.VdomNode)(implicit F: Sync[F]): vdom.PackageBase.VdomElement

    The Profiler measures how often a React application renders and what the "cost" of rendering is.

    The Profiler measures how often a React application renders and what the "cost" of rendering is. Its purpose is to help identify parts of an application that are slow and may benefit from optimizations such as memoization.

    See https://reactjs.org/docs/profiler.html

    children

    Use React.Fragment to group multiple children.

    Since

    React 16.9.0 / scalajs-react 1.7.0

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. object Interaction extends Serializable

Deprecated Value Members

  1. def unstable_trace[A](name: String)(body: => A): A

    CAUTION: Unstable API.

    CAUTION: Unstable API. React may modify or remove this method without notice or deprecation and so might scalajs-react.

    Traces a new interaction (by appending to the existing set of interactions). The callback function will be executed and its return value will be returned to the caller. Any code run within that callback will be attributed to that interaction. Calls to unstable_wrap() will schedule async work within the same zone.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) Removed in React 18

Inherited from AnyRef

Inherited from Any

Ungrouped