Package

japgolly.scalajs

react

Permalink

package react

Linear Supertypes
ReactEventTypes, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. react
  2. ReactEventTypes
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AsyncCallback[A] extends AnyVal

    Permalink

    Pure asynchronous callback.

    Pure asynchronous callback.

    You can think of this as being similar to using Future - you can use it in for-comprehensions the same way - except AsyncCallback is pure and doesn't need an ExecutionContext.

    When combining instances, it's good to know which methods are sequential and which are parallel (or at least concurrent).

    The following methods are sequential: - >>=() / flatMap() - >>() & <<() - flatTap()

    The following methods are effectively parallel: - *>() & <*() - race() - zip() & zipWith() - AsyncCallback.traverse et al

    In order to actually run this, or get it into a shape in which in can be run, use one of the following: - toCallback <-- most common - asCallbackToFuture - asCallbackToJsPromise - unsafeToFuture() - unsafeToJsPromise()

    A good example is the [Ajax 2 demo](https://japgolly.github.io/scalajs-react/#examples/ajax-2).

    A

    The type of data asynchronously produced on success.

  2. type BackendScope[P, S] = MountedWithRoot[CallbackTo, P, S, P, S]

    Permalink
  3. type Callback = CallbackTo[Unit]

    Permalink
  4. final case class CallbackKleisli[A, B](run: (A) ⇒ CallbackTo[B]) extends AnyVal with Product with Serializable

    Permalink

    A => CallbackTo[B] aka Kleisli[CallbackTo, A, B] aka ReaderT[A, CallbackTo, B].

    A => CallbackTo[B] aka Kleisli[CallbackTo, A, B] aka ReaderT[A, CallbackTo, B].

    Never heard of Kleisli? Basically, a "Kleisli triple" is a function with the shape A => M[B]. In this case, the M is hard-coded to CallbackTo.

    This is hard-coded to CallbackTo for the same reasons as CallbackOption and for the same reasons that CallbackTo exists.

    Since

    1.2.0

  5. final class CallbackOption[A] extends AnyVal

    Permalink

    Callback that can short-circuit along the way when conditions you specify, aren't met.

    Callback that can short-circuit along the way when conditions you specify, aren't met.

    Especially useful for event handlers such as key handlers, drag-and-drop handlers, etc, where you check a condition, perform an effect, check another condition, perform another effect, etc.

    This is meant to be lightweight, and be immediately useful without the typical pain of imports, implicit conversions and extension methods then normally accompany monad transforms in Scala.

    For a more generic (i.e. beyond Option) or comprehensive monad transformer use Scalaz or similar.

  6. final class CallbackTo[A] extends AnyVal

    Permalink

    A function to be executed later, usually by scalajs-react in response to some kind of event.

    A function to be executed later, usually by scalajs-react in response to some kind of event.

    The purpose of this class is to lift effects into the type system, and use the compiler to ensure safety around callbacks (without depending on an external library like Scalaz).

    () => Unit is replaced by Callback. Similarly, ReactEvent => Unit is replaced by ReactEvent => Callback.

    A

    The type of result produced when the callback is invoked.

    Since

    0.10.0

  7. sealed trait Children extends AnyRef

    Permalink

    Describes how a component uses .props.children.

  8. sealed trait ComponentDom extends AnyRef

    Permalink
  9. sealed abstract class CtorType[-P, +U] extends AnyRef

    Permalink
  10. type GenericComponent[P, CT[-p, +u] <: CtorType[p, u], U] = ComponentSimple[P, CT, U]

    Permalink
  11. type JsComponent[P <: Object, S <: Object, CT[-p, +u] <: CtorType[p, u]] = react.component.Js.ComponentWithRoot[P, CT, UnmountedWithRawType[P, S, RawMounted[P, S]], P, CT, UnmountedWithRawType[P, S, RawMounted[P, S]]]

    Permalink
  12. type JsComponentWithFacade[P <: Object, S <: Object, F <: Object, CT[-p, +u] <: CtorType[p, u]] = react.component.Js.ComponentWithRoot[P, CT, UnmountedWithRawType[P, S, RawMounted[P, S] with F], P, CT, UnmountedWithRawType[P, S, RawMounted[P, S] with F]]

    Permalink
  13. type JsFnComponent[P <: Object, CT[-p, +u] <: CtorType[p, u]] = react.component.JsFn.ComponentWithRoot[P, CT, Unmounted[P], P, CT, Unmounted[P]]

    Permalink
  14. type JsForwardRefComponent[P <: Object, R, CT[-p, +u] <: CtorType[p, u]] = ComponentWithRoot[P, R, CT, Unmounted[P, R], P, CT, Unmounted[P, R]]

    Permalink
  15. type Key = |[String, JsNumber]

    Permalink
  16. final class ModStateFn[F[_], S] extends AbstractFunction2[(S) ⇒ Option[S], Callback, F[Unit]] with ModState[F, S]

    Permalink
  17. type ModStateFnImpure[S] = ModStateFn[Id, S]

    Permalink
  18. type ModStateFnPure[S] = ModStateFn[CallbackTo, S]

    Permalink
  19. final class ModStateWithPropsFn[F[_], P, S] extends AbstractFunction2[(S, P) ⇒ Option[S], Callback, F[Unit]] with ModStateWithProps[F, P, S]

    Permalink
  20. type ModStateWithPropsFnImpure[P, S] = ModStateWithPropsFn[Id, P, S]

    Permalink
  21. type ModStateWithPropsFnPure[P, S] = ModStateWithPropsFn[CallbackTo, P, S]

    Permalink
  22. final class PropsChildren extends AnyVal

    Permalink
  23. final type ReactAnimationEvent = SyntheticAnimationEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  24. final type ReactAnimationEventFrom[+N <: Node] = SyntheticAnimationEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  25. final type ReactAnimationEventFromHtml = SyntheticAnimationEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  26. final type ReactAnimationEventFromInput = SyntheticAnimationEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  27. final type ReactAnimationEventFromTextArea = SyntheticAnimationEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  28. final type ReactClipboardEvent = SyntheticClipboardEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  29. final type ReactClipboardEventFrom[+N <: Node] = SyntheticClipboardEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  30. final type ReactClipboardEventFromHtml = SyntheticClipboardEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  31. final type ReactClipboardEventFromInput = SyntheticClipboardEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  32. final type ReactClipboardEventFromTextArea = SyntheticClipboardEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  33. final type ReactCompositionEvent = SyntheticCompositionEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  34. final type ReactCompositionEventFrom[+N <: Node] = SyntheticCompositionEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  35. final type ReactCompositionEventFromHtml = SyntheticCompositionEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  36. final type ReactCompositionEventFromInput = SyntheticCompositionEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  37. final type ReactCompositionEventFromTextArea = SyntheticCompositionEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  38. final type ReactDragEvent = SyntheticDragEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  39. final type ReactDragEventFrom[+N <: Node] = SyntheticDragEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  40. final type ReactDragEventFromHtml = SyntheticDragEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  41. final type ReactDragEventFromInput = SyntheticDragEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  42. final type ReactDragEventFromTextArea = SyntheticDragEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  43. final type ReactEvent = SyntheticEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  44. final type ReactEventFrom[+N <: Node] = SyntheticEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  45. final type ReactEventFromHtml = SyntheticEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  46. final type ReactEventFromInput = SyntheticEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  47. final type ReactEventFromTextArea = SyntheticEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  48. trait ReactEventTypes extends AnyRef

    Permalink
  49. final class ReactExt_DomEvent extends AnyVal

    Permalink
  50. implicit final class ReactExt_DomNode extends AnyVal

    Permalink

    Extensions to plain old DOM.

    Extensions to plain old DOM.

    Annotations
    @inline()
  51. implicit final class ReactExt_OptionCallback extends AnyVal

    Permalink
    Annotations
    @inline()
  52. final class ReactExt_ReactEvent[E <: ReactEvent] extends AnyVal

    Permalink
  53. final class ReactExt_ReactKeyboardEvent[N <: Node] extends AnyVal

    Permalink
  54. implicit final class ReactExt_ScalaComponent[P, S, B, CT[-p, +u] <: CtorType[p, u]] extends AnyVal

    Permalink
  55. implicit final class ReactExtrasExt_Any[A] extends AnyVal

    Permalink
  56. final type ReactFocusEvent = SyntheticFocusEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  57. final type ReactFocusEventFrom[+N <: Node] = SyntheticFocusEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  58. final type ReactFocusEventFromHtml = SyntheticFocusEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  59. final type ReactFocusEventFromInput = SyntheticFocusEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  60. final type ReactFocusEventFromTextArea = SyntheticFocusEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  61. final type ReactKeyboardEvent = SyntheticKeyboardEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  62. final type ReactKeyboardEventFrom[+N <: Node] = SyntheticKeyboardEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  63. final type ReactKeyboardEventFromHtml = SyntheticKeyboardEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  64. final type ReactKeyboardEventFromInput = SyntheticKeyboardEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  65. final type ReactKeyboardEventFromTextArea = SyntheticKeyboardEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  66. final type ReactMouseEvent = SyntheticMouseEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  67. final type ReactMouseEventFrom[+N <: Node] = SyntheticMouseEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  68. final type ReactMouseEventFromHtml = SyntheticMouseEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  69. final type ReactMouseEventFromInput = SyntheticMouseEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  70. final type ReactMouseEventFromTextArea = SyntheticMouseEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  71. final type ReactPointerEvent = SyntheticPointerEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  72. final type ReactPointerEventFrom[+N <: Node] = SyntheticPointerEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  73. final type ReactPointerEventFromHtml = SyntheticPointerEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  74. final type ReactPointerEventFromInput = SyntheticPointerEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  75. final type ReactPointerEventFromTextArea = SyntheticPointerEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  76. final type ReactTouchEvent = SyntheticTouchEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  77. final type ReactTouchEventFrom[+N <: Node] = SyntheticTouchEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  78. final type ReactTouchEventFromHtml = SyntheticTouchEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  79. final type ReactTouchEventFromInput = SyntheticTouchEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  80. final type ReactTouchEventFromTextArea = SyntheticTouchEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  81. final type ReactTransitionEvent = SyntheticTransitionEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  82. final type ReactTransitionEventFrom[+N <: Node] = SyntheticTransitionEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  83. final type ReactTransitionEventFromHtml = SyntheticTransitionEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  84. final type ReactTransitionEventFromInput = SyntheticTransitionEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  85. final type ReactTransitionEventFromTextArea = SyntheticTransitionEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  86. final type ReactUIEvent = SyntheticUIEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  87. final type ReactUIEventFrom[+N <: Node] = SyntheticUIEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  88. final type ReactUIEventFromHtml = SyntheticUIEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  89. final type ReactUIEventFromInput = SyntheticUIEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  90. final type ReactUIEventFromTextArea = SyntheticUIEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  91. final type ReactWheelEvent = SyntheticWheelEvent[Node]

    Permalink
    Definition Classes
    ReactEventTypes
  92. final type ReactWheelEventFrom[+N <: Node] = SyntheticWheelEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  93. final type ReactWheelEventFromHtml = SyntheticWheelEvent[Element]

    Permalink
    Definition Classes
    ReactEventTypes
  94. final type ReactWheelEventFromInput = SyntheticWheelEvent[Input]

    Permalink
    Definition Classes
    ReactEventTypes
  95. final type ReactWheelEventFromTextArea = SyntheticWheelEvent[TextArea]

    Permalink
    Definition Classes
    ReactEventTypes
  96. final class Reusability[A] extends AnyVal

    Permalink

    Tests whether one instance can be used in place of another.

    Tests whether one instance can be used in place of another. Used mostly to compare properties and state of a component to avoid unnecessary updates.

    If you imagine a class with 8 fields, equality would compare all 8 fields where as this would typically just compare the ID field, the update-date, or the revision number. You might think of this as a very quick version of equality.

    Don't miss Reusability.shouldComponentUpdate which can be applied to a component via ScalaComponent.build#configure.

    Since

    0.9.0

  97. final class Reusable[+A] extends AnyRef

    Permalink

    A value that has been explicitly paired with a (potentially ad-hoc) Reusability instance.

    A value that has been explicitly paired with a (potentially ad-hoc) Reusability instance.

    A

    The type of value.

    Since

    1.0.0

  98. type ScalaComponent[P, S, B, CT[-p, +u] <: CtorType[p, u]] = react.component.Js.ComponentWithRoot[P, CT, Unmounted[P, S, B], Box[P], CT, JsUnmounted[P, S, B]]

    Permalink
  99. type ScalaFnComponent[P, CT[-p, +u] <: CtorType[p, u]] = react.component.JsFn.ComponentWithRoot[P, CT, Unmounted[P], Box[P], CT, Unmounted[Box[P]]]

    Permalink
  100. type ScalaForwardRefComponent[P, R, CT[-p, +u] <: CtorType[p, u]] = ComponentWithRoot[P, R, CT, Unmounted[P, R], Box[P], CT, Unmounted[Box[P], R]]

    Permalink
  101. final class SetStateFn[F[_], S] extends AbstractFunction2[Option[S], Callback, F[Unit]] with SetState[F, S]

    Permalink
  102. type SetStateFnImpure[S] = SetStateFn[Id, S]

    Permalink
  103. type SetStateFnPure[S] = SetStateFn[CallbackTo, S]

    Permalink
  104. trait StateAccess[F[_], S] extends Write[F, S]

    Permalink

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

    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.

  105. type StateAccessImpure[S] = StateAccess[Id, S]

    Permalink
  106. type StateAccessPure[S] = StateAccess[CallbackTo, S]

    Permalink
  107. trait StateAccessorImplicits extends StateAccessorImplicits1

    Permalink
  108. trait StateAccessorImplicits1 extends StateAccessorImplicits2

    Permalink
  109. trait StateAccessorImplicits2 extends AnyRef

    Permalink
  110. sealed trait UpdateSnapshot extends AnyRef

    Permalink
  111. type ~=>[-A, +B] = Reusable[(A) ⇒ B]

    Permalink

Value Members

  1. object AsyncCallback

    Permalink
  2. object Callback

    Permalink

    A callback with no return value.

    A callback with no return value. Equivalent to () => Unit.

    See also

    CallbackTo

  3. object CallbackKleisli extends Serializable

    Permalink
  4. object CallbackOption

    Permalink
  5. object CallbackTo

    Permalink
  6. object Children

    Permalink
  7. object ComponentDom

    Permalink
  8. object CtorType

    Permalink
  9. val GenericComponent: Generic.type

    Permalink
  10. val JsComponent: Js.type

    Permalink
  11. val JsFnComponent: JsFn.type

    Permalink
  12. val JsForwardRefComponent: JsForwardRef.type

    Permalink
  13. object ModStateFn

    Permalink
  14. object ModStateWithPropsFn

    Permalink
  15. object PropsChildren

    Permalink
  16. object React

    Permalink
  17. object ReactDOM

    Permalink
  18. object ReactDOMServer

    Permalink
  19. object ReactMouseEvent

    Permalink
  20. object Ref

    Permalink
  21. object Reusability

    Permalink
  22. object Reusable

    Permalink
  23. val ScalaComponent: Scala.type

    Permalink
  24. val ScalaFnComponent: ScalaFn.type

    Permalink
  25. val ScalaForwardRefComponent: ScalaForwardRef.type

    Permalink
  26. object SetStateFn

    Permalink
  27. object StateAccess

    Permalink
  28. object StateAccessor extends StateAccessorImplicits

    Permalink

    Type-classes that provide read and/or write access to state.

    Type-classes that provide read and/or write access to state.

    The syntax is a little wonky for technical reasons. For read access, it's typeclass.state(i): F[S]. For write access, it's typeclass(i).setState(...): F[Unit].

  29. object UpdateSnapshot

    Permalink
  30. package component

    Permalink
  31. package feature

    Permalink
  32. package internal

    Permalink
  33. package raw

    Permalink

    See https://flow.org/en/docs/react/types

  34. implicit def toReactExt_DomEvent(e: Event): ReactExt_DomEvent

    Permalink
    Definition Classes
    ReactEventTypes
  35. implicit def toReactExt_ReactEvent[E <: ReactEvent](e: E): ReactExt_ReactEvent[E]

    Permalink
    Definition Classes
    ReactEventTypes
  36. implicit def toReactExt_ReactKeyboardEvent[N <: Node](e: ReactKeyboardEventFrom[N]): ReactExt_ReactKeyboardEvent[N]

    Permalink
    Definition Classes
    ReactEventTypes
  37. package vdom

    Permalink

Inherited from ReactEventTypes

Inherited from AnyRef

Inherited from Any

Ungrouped