Trait/Object

japgolly.scalajs.react

StateAccess

Related Docs: object StateAccess | package react

Permalink

trait StateAccess[F[_], S] extends Write[F, S]

Base class for something that has read/write state access (under the same effect type).

Passing this around (top-level) is fine but do not use it in a generic/library/helper method. In intermediary positions, use StateAccessor instead.

F

The type of effect when accessing state.

S

State type.

Linear Supertypes
Write[F, S], ModState[F, S], SetState[F, S], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateAccess
  2. Write
  3. ModState
  4. SetState
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final type State = S

    Permalink
  2. abstract type WithEffect[F2[_]] <: StateAccess[F2[_], S]

    Permalink
  3. abstract type WithMappedState[S2] <: StateAccess[F, S2]

    Permalink

Abstract Value Members

  1. implicit abstract def F: Effect[F]

    Permalink
    Attributes
    protected
  2. abstract def modStateOption(mod: (S) ⇒ Option[S], callback: Callback): F[Unit]

    Permalink

    callback

    Executed regardless of whether state is changed.

    Definition Classes
    ModState
  3. abstract def setStateOption(newState: Option[S], callback: Callback): F[Unit]

    Permalink

    callback

    Executed regardless of whether state is changed.

    Definition Classes
    SetState
  4. abstract def state: F[State]

    Permalink
  5. abstract def withEffect[F2[_]](implicit t: Trans[F, F2]): WithEffect[F2]

    Permalink
  6. abstract def xmapState[S2](f: (S) ⇒ S2)(g: (S2) ⇒ S): WithMappedState[S2]

    Permalink
  7. abstract def zoomState[S2](get: (S) ⇒ S2)(set: (S2) ⇒ (S) ⇒ S): WithMappedState[S2]

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def modState(mod: (S) ⇒ S, callback: Callback): F[Unit]

    Permalink

    callback

    Executed after state is changed.

    Definition Classes
    ModState
  13. final def modState(mod: (S) ⇒ S): F[Unit]

    Permalink
    Definition Classes
    ModState
  14. final def modStateOption(mod: (S) ⇒ Option[S]): F[Unit]

    Permalink
    Definition Classes
    ModState
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def setState(newState: S, callback: Callback): F[Unit]

    Permalink

    callback

    Executed after state is changed.

    Definition Classes
    SetState
  19. final def setState(newState: S): F[Unit]

    Permalink
    Definition Classes
    SetState
  20. final def setStateOption(newState: Option[S]): F[Unit]

    Permalink
    Definition Classes
    SetState
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toModStateFn: ModStateFn[F, S]

    Permalink
    Definition Classes
    ModState
  23. def toSetStateFn: SetStateFn[F, S]

    Permalink
    Definition Classes
    SetState
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def withEffectsImpure(implicit t: Trans[F, Id]): WithEffect[Id]

    Permalink
  29. final def withEffectsPure(implicit t: Trans[F, CallbackTo]): WithEffect[CallbackTo]

    Permalink

Deprecated Value Members

  1. final def modStateFn[I](f: (I) ⇒ (S) ⇒ S, callback: Callback = Callback.empty): (I) ⇒ F[Unit]

    Permalink
    Definition Classes
    ModState
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) Create a function yourself. If you're using this in Reusable.fn(…), use Reusable.fn.state(this.zoom…).mod instead

  2. final def modStateOptionFn[I](f: (I) ⇒ (S) ⇒ Option[S], callback: Callback = Callback.empty): (I) ⇒ F[Unit]

    Permalink
    Definition Classes
    ModState
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) Create a function yourself. If you're using this in Reusable.fn(…), use Reusable.fn.state(this.zoom…).modOption instead

  3. final def setStateFn[I](f: (I) ⇒ S, callback: Callback = Callback.empty): (I) ⇒ F[Unit]

    Permalink
    Definition Classes
    SetState
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) Create a function yourself. If you're using this in Reusable.fn(…), use Reusable.fn.state(this.zoom…).set instead

  4. final def setStateOptionFn[I](f: (I) ⇒ Option[S], callback: Callback = Callback.empty): (I) ⇒ F[Unit]

    Permalink
    Definition Classes
    SetState
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) Create a function yourself. If you're using this in Reusable.fn(…), use Reusable.fn.state(this.zoom…).setOption instead

Inherited from Write[F, S]

Inherited from ModState[F, S]

Inherited from SetState[F, S]

Inherited from AnyRef

Inherited from Any

Ungrouped