Package

japgolly.scalajs.react

extra

Permalink

package extra

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. extra
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait Broadcaster[A] extends Listenable[A]

    Permalink

    Implementation of Listener.

    Implementation of Listener. Subclasses can broadcast data of type A via the broadcast method.

  2. class DefaultReusabilityOverlay extends ReusabilityOverlay with TimerSupport

    Permalink
  3. final class ExternalVar[A] extends AnyRef

    Permalink

    Provides a component with safe R/W access to an external variable.

    Provides a component with safe R/W access to an external variable.

    Use ReusableVar for a reusable version of this.

  4. trait Listenable[A] extends AnyRef

    Permalink

    External entities can register with this to listen (receive) data of type A.

    External entities can register with this to listen (receive) data of type A.

    Install in ReactComponentB via .configure(Listenable.install...).

  5. trait OnUnmount extends AnyRef

    Permalink

    Accrues procedures to be run automatically when its component unmounts.

    Accrues procedures to be run automatically when its component unmounts.

    Install in ReactComponentB via .configure(OnUnmount.install).

  6. sealed abstract class Px[A] extends AnyRef

    Permalink

    A mechanism for caching data with dependencies.

    A mechanism for caching data with dependencies.

    This is basically a performance-focused, lightweight implementation of pull-based FRP, pull-based meaning that in the chain A→B→C, an update to A doesn't affect C until the value of C is requested.

    What does Px mean? I don't know, I just needed a name and I liked the way @lihaoyi's Rx type name looked in code. You can consider this "Performance eXtension". If this were Java it'd be named AutoRefreshOnRequestDependentCachedVariable.

  7. implicit final class ReactExtrasAnyExt[A] extends AnyVal

    Permalink
    Annotations
    @inline()
  8. final class Reusability[A] extends AnyVal

    Permalink

    Tests whether one instance can be used in place of another.

    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

  9. trait ReusabilityOverlay extends AnyRef

    Permalink
  10. sealed abstract class ReusableFn[A, B] extends AbstractFunction1[A, B]

    Permalink

    A function that facilitates stability and reuse.

    A function that facilitates stability and reuse.

    In effective usage of React, callbacks are passed around as component properties. Due to the ease of function creation in Scala if it often the case that functions are created inline and thus provide no means of determining whether a component can safely skip its update. This class exists as a solution.

    Since

    0.9.0

  11. final class ReusableFnA[A, B] extends AnyRef

    Permalink

    A ReusableFn from A to B, paired with a value of A.

    A ReusableFn from A to B, paired with a value of A.

    Ideally this would be ReusableFn0[B] without needing the A (a reusable version of () => B) but the overhead to reliably create such a construct is annoyingly high and not worth it.

  12. class ReusableVal[A] extends AnyRef

    Permalink

    A value explicitly being marked as reusable.

    A value explicitly being marked as reusable.

    Usually reusability is determined by type (ie. via an implicit Reusability[A] available for an A). Instead, this type promises that reusability will be explicitly provided with each value.

  13. class ReusableVal2[A, S] extends AnyRef

    Permalink
  14. final class ReusableVar[A] extends AnyRef

    Permalink

    Reusable version of ExternalVar.

  15. case class ShouldComponentUpdateResult[P, S, +B, +N <: TopNode]($: DuringCallbackM[P, S, B, N], nextProps: P, nextState: S)(implicit evidence$268: Reusability[P], evidence$269: Reusability[S]) extends Product with Serializable

    Permalink
  16. trait TimerSupport extends OnUnmount

    Permalink

    Alternatives to window.setTimeout/window.setInterval that automatically unregisters installed callbacks when its component unmounts.

    Alternatives to window.setTimeout/window.setInterval that automatically unregisters installed callbacks when its component unmounts.

    Provides interval methods that guarentee duration between callbacks. Regular use of setInterval is fine for callbacks with determined execution time. However, if your callback could possibly take as long or longer than your timeout, you can end up with callbacks firing back to back.

    Install in ReactComponentB via .configure(TimerSupport.install).

  17. type ~=>[A, B] = ReusableFn[A, B]

    Permalink

Value Members

  1. object DefaultReusabilityOverlay

    Permalink
  2. object EventListener

    Permalink
  3. object ExternalVar

    Permalink
  4. object Listenable

    Permalink
  5. object LogLifecycle

    Permalink

    Installing this will cause logging to occur at React component lifecycle stages.

    Installing this will cause logging to occur at React component lifecycle stages.

    Install in ReactComponentB via .configure(LogLifecycle.short) or .configure(LogLifecycle.verbose).

  6. object OnUnmount

    Permalink
  7. object Px

    Permalink
  8. object Reusability

    Permalink
  9. object ReusabilityOverlay

    Permalink

    Heavily inspired by https://github.com/redsunsoft/react-render-visualizer

  10. object ReusableFn

    Permalink
  11. object ReusableFnA

    Permalink
  12. object ReusableVal

    Permalink
  13. object ReusableVal2

    Permalink
  14. object ReusableVar

    Permalink
  15. object TimerSupport

    Permalink
  16. def assertWarn(test: ⇒ Boolean, msg: ⇒ String): Unit

    Permalink
    Annotations
    @elidable( elidable.ASSERTION )
  17. package router

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped