withReuse

japgolly.scalajs.react.extra.internal.StateSnapshot$.withReuse$
object withReuse

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
withReuse.type

Members list

Type members

Classlikes

final class FromLens[S, T](l: Lens[S, T]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final class FromLensSetStateFn[S, T](l: Lens[S, T], set: Reusable[() => T])

Attributes

Supertypes
class Object
trait Matchable
class Any
final class FromSetStateFn[S](set: Reusable[() => S]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final class FromValue[S](value: S) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def apply[S](value: S): FromValue[S]
def hook[S](initialValue: => S)(implicit rs: Reusability[S]): CustomHook[Unit, StateSnapshot[S]]

Attributes

Since

2.0.0

def prepare[S](f: () => S): FromSetStateFn[S]

This is meant to be called once and reused so that the setState callback stays the same.

This is meant to be called once and reused so that the setState callback stays the same.

Attributes

def prepareF[F[_] : Sync, S](f: F => S): FromSetStateFn[S]

This is meant to be called once and reused so that the setState callback stays the same.

This is meant to be called once and reused so that the setState callback stays the same.

Attributes

def prepareTupled[S](f: () => S): FromSetStateFn[S]

This is meant to be called once and reused so that the setState callback stays the same.

This is meant to be called once and reused so that the setState callback stays the same.

Attributes

def prepareTupledF[F[_] : Sync, S](f: F => S): FromSetStateFn[S]

This is meant to be called once and reused so that the setState callback stays the same.

This is meant to be called once and reused so that the setState callback stays the same.

Attributes

def prepareVia[I, F[_], A[_], S](i: I)(implicit t: Write[I, F, A, S]): FromSetStateFn[S]

This is meant to be called once and reused so that the setState callback stays the same.

This is meant to be called once and reused so that the setState callback stays the same.

Attributes

def prepareViaCallback[F[_], I, G[_], A[_], S](cb: F[I])(implicit t: I => SetState[G, A, S], F: Sync[F], G: Sync[G]): FromSetStateFn[S]
def prepareViaProps[F[_], A1[_], P, S1, I, G[_], A2[_], S]($: MountedSimple[F, A1, P, S1])(f: P => I)(implicit t: I => SetState[G, A2, S], F: Sync[F], G: Sync[G]): FromSetStateFn[S]
def useStateSnapshotWithReuse[S](initialValue: => S)(implicit rs: Reusability[S]): Delayed[StateSnapshot[S]]

Attributes

Since

3.0.0

def xmap[S, T](get: S => T)(set: T => S): FromLens[S, T]
def zoom[S, T](get: S => T)(set: T => S => S): FromLens[S, T]