japgolly.scalajs.react.extra

Reusability

Related Docs: object Reusability | package extra

final class Reusability[A] extends AnyVal

Tests whether one instance can be used in place of another. Used mostly to compare properties and state of a component to avoid unnecessary updates.

If you imagine a class with 8 fields, equality would compare all 8 fields where as this would typically just compare the ID field, the update-date, or the revision number. You might think of this as a very quick version of equality.

Don't miss Reusability.shouldComponentUpdate which can be applied to a component via ReactComponentB.configure.

Since

0.9.0

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Reusability
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Reusability(test: (A, A) ⇒ Boolean)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def contramap[B](f: (B) ⇒ A): Reusability[B]

  6. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  8. def narrow[B <: A]: Reusability[B]

  9. val test: (A, A) ⇒ Boolean

  10. def testNot: (A, A) ⇒ Boolean

  11. def toString(): String

    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped