japgolly.scalajs.react.extra

Members list

Type members

Classlikes

object Ajax extends AjaxF[Sync, Async]

Attributes

Supertypes
class AjaxF[Sync, Async]
class Object
trait Matchable
class Any
Self type
Ajax.type
trait Broadcaster[A] extends BroadcasterF[Sync, A], Listenable[A]

Attributes

Supertypes
trait Listenable[A]
trait BroadcasterF[Sync, A]
trait ListenableF[Sync, A]
class Object
trait Matchable
class Any
Show all
trait BroadcasterF[F[_], A] extends ListenableF[F, A]

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

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

Attributes

Supertypes
trait ListenableF[F, A]
class Object
trait Matchable
class Any
Known subtypes
class RouterLogicF[F, Page, Props]
trait Broadcaster[A]
Self type
BroadcasterF[F, A]

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DefaultReusabilityOverlay[F[_]]($: Comp, options: Options[F])(implicit F: Sync[F]) extends ReusabilityOverlay[F], TimerSupportF[F]

Attributes

Companion
object
Supertypes
trait TimerSupportF[F]
trait OnUnmountF[F]
class Object
trait Matchable
class Any
Show all
object EventListener extends EventListenerF[Sync]

Attributes

Supertypes
class EventListenerF[Sync]
class Object
trait Matchable
class Any
Self type
class EventListenerF[F[_]]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EventListener.type

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait Listenable[A] extends ListenableF[Sync, A]

Attributes

Companion
object
Supertypes
trait ListenableF[Sync, A]
class Object
trait Matchable
class Any
Known subtypes
trait Broadcaster[A]
object Listenable

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Listenable.type
trait ListenableF[F[_], A]

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 ScalaComponent.build via .configure(Listenable.listen).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait BroadcasterF[F, A]
class RouterLogicF[F, Page, Props]
trait Broadcaster[A]
trait Listenable[A]
Self type
ListenableF[F, A]
object ListenableF

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait OnUnmount extends OnUnmountF[Sync]

Accrues procedures to be run automatically when its component unmounts.

Accrues procedures to be run automatically when its component unmounts.

Install in ScalaComponent.build via .configure(OnUnmount.install).

Attributes

Companion
object
Supertypes
trait OnUnmountF[Sync]
class Object
trait Matchable
class Any
Known subtypes
class Backend
trait TimerSupport
object OnUnmount

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
OnUnmount.type
trait OnUnmountF[F[_]]

Accrues procedures to be run automatically when its component unmounts.

Accrues procedures to be run automatically when its component unmounts.

Install in ScalaComponent.build via .configure(OnUnmount.install).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
object OnUnmountF

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
OnUnmountF.type
sealed abstract class Px[A]

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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Derivative[A]
class DerivativeBase[A, B, C]
class FlatMap[A, B]
class Map[A, B]
class Root[A]
class ThunkM[A]
class Var[A]
Show all
object Px

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Px.type

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

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ReusabilityOverlay[F[_]]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class StateSnapshotF[F[_], A[_], S](val value: S, val underlyingSetFn: Reusable[F => S], val reusability: Reusability[S])(implicit FF: UnsafeSync[F], AA: Async[A]) extends Write[F, A, S]

Attributes

Companion
object
Supertypes
trait Write[F, A, S]
trait ModState[F, A, S]
trait SetState[F, A, S]
trait Base[F, A]
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait TimerSupport extends TimerSupportF[Sync], OnUnmount

Alternatives to window.setTimeout/window.setInterval that automatically unregister installed callbacks when the component unmounts.

Alternatives to window.setTimeout/window.setInterval that automatically unregister installed callbacks when the 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 ScalaComponent.build via .configure(TimerSupport.install).

Attributes

Companion
object
Supertypes
trait OnUnmount
trait TimerSupportF[Sync]
trait OnUnmountF[Sync]
class Object
trait Matchable
class Any
Show all
object TimerSupport

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait TimerSupportF[F[_]] extends OnUnmountF[F]

Alternatives to window.setTimeout/window.setInterval that automatically unregister installed callbacks when the component unmounts.

Alternatives to window.setTimeout/window.setInterval that automatically unregister installed callbacks when the 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 ScalaComponent.build via .configure(TimerSupport.install).

Attributes

Companion
object
Supertypes
trait OnUnmountF[F]
class Object
trait Matchable
class Any
Known subtypes
Self type
object TimerSupportF

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Types

Value members

Inherited methods

def useStateSnapshot[S](initialState: => S): Delayed[StateSnapshot[S]]

Attributes

Inherited from:
HooksApiExt
def useStateSnapshotWithReuse[S](initialState: => S)(implicit r: Reusability[S]): Delayed[StateSnapshot[S]]

Attributes

Inherited from:
HooksApiExt

Concrete fields

lazy val StateSnapshot: StateSnapshot.type

Implicits

Inherited implicits

implicit def hooksExtUseStateSnapshot1[Ctx, Step <: AbstractStep](api: Primary[Ctx, Step]): Primary[Ctx, Step]

Attributes

Inherited from:
HooksApiExt
implicit def hooksExtUseStateSnapshot2[Ctx, CtxFn[_], Step <: SubsequentStep[Ctx, CtxFn]](api: Secondary[Ctx, CtxFn, Step]): Secondary[Ctx, CtxFn, Step]

Attributes

Inherited from:
HooksApiExt