japgolly.scalajs.react.extra

Type members

Classlikes

object Ajax extends AjaxF[Sync, Async]
trait Broadcaster[A] extends BroadcasterF[Sync, A] with Listenable[A]
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.

class DefaultReusabilityOverlay[F[_]]($: Comp, options: Options[F])(implicit F: Sync[F]) extends ReusabilityOverlay[F] with TimerSupportF[F]
Companion:
object
object EventListener extends EventListenerF[Sync]
class EventListenerF[F[_]]
Companion:
object
Companion:
class
trait Listenable[A] extends ListenableF[Sync, A]
Companion:
object
object Listenable
Companion:
class
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).

Companion:
object
Companion:
class
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).

Companion:
object
object OnUnmount
Companion:
class
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).

Companion:
object
object OnUnmountF
Companion:
class
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.

Companion:
object
object Px
Companion:
class

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

trait ReusabilityOverlay[F[_]]
Companion:
object
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]
Companion:
object
Companion:
class
trait TimerSupport extends TimerSupportF[Sync] with 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).

Companion:
object
Companion:
class
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).

Companion:
object
Companion:
class

Types

Value members

Concrete fields

Implicits

Inherited implicits

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