withReuse

object withReuse
class Object
trait Matchable
class Any

Type members

Classlikes

final class FromLens[S, T](l: Lens[S, T]) extends AnyVal
final class FromLensSetStateFn[S, T](l: Lens[S, T], set: Reusable[() => T])
final class FromSetStateFn[S](set: Reusable[() => S]) extends AnyVal
final class FromValue[S](value: S) extends AnyVal

Value members

Concrete methods

def apply[S](value: S): FromValue[S]
def hook[S](initialValue: => S)(implicit rs: Reusability[S]): CustomHook[Unit, StateSnapshot[S]]
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.

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.

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.

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.

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.

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 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]