package react
- Alphabetic
- Public
- Protected
Package Members
Type Members
- sealed trait Children extends AnyRef
Describes how a component uses
.props.children
. - sealed trait ComponentDom extends AnyRef
- sealed abstract class CtorType[-P, +U] extends AnyRef
- final class ModStateFn[F[_], A[_], S] extends AbstractFunction2[(S) => Option[S], F[Unit], F[Unit]] with ModState[F, A, S]
- final class ModStateWithPropsFn[F[_], A[_], P, S] extends AbstractFunction2[(S, P) => Option[S], F[Unit], F[Unit]] with ModStateWithProps[F, A, P, S]
- final class PropsChildren extends AnyVal
- final case class ReactCaughtError(rawError: Any, rawInfo: ErrorInfo) extends Product with Serializable
The data captured by React when it catches an error for the
componentDidCatch
event.The data captured by React when it catches an error for the
componentDidCatch
event.- rawError
The JS error. Usually a js.Error. If you threw an error using
throw js.JavaScriptException("OMG")
then is value is just the argument"OMG"
.
- Since
1.6.0
- trait ReactEventTypes extends AnyRef
- final class ReactExt_DomEvent[F[_]] extends AnyRef
- final class ReactExt_ReactEvent[F[_], E <: SyntheticEvent[Node]] extends AnyRef
- final class ReactExt_ReactKeyboardEvent[N <: Node] extends AnyVal
- trait ReactExtensions extends AnyRef
- final case class ReactRoot(raw: RootType) extends Product with Serializable
A location in the DOM into which React has initialised itself, and now manages.
A location in the DOM into which React has initialised itself, and now manages.
Can be used to render a React element into the DOM with
.render
.- Annotations
- @inline()
- Since
v2.2.0 / React 18
- final case class Renderable[-A](raw: (A) => Node) extends AnyVal with Product with Serializable
Typeclass for anything that React can render.
Typeclass for anything that React can render.
- Annotations
- @inline()
- Since
v2.2.0 / React 18
- final class Reusability[A] extends AnyVal
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 viaScalaComponent.build#configure
.- Since
0.9.0
- trait ReusabilityMacros extends AnyRef
- final class Reusable[+A] extends AnyRef
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
- trait ScalaVersionSpecificReusability extends AnyRef
Reusability specific to Scala 2.13
- final class SetStateFn[F[_], A[_], S] extends AbstractFunction2[Option[S], F[Unit], F[Unit]] with SetState[F, A, S]
- trait StateAccess[F[_], A[_], S] extends Write[F, A, S]
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.
- trait StateAccessorImplicits extends StateAccessorImplicits1
- trait StateAccessorImplicits1 extends StateAccessorImplicits2
- trait StateAccessorImplicits2 extends AnyRef
- sealed trait UpdateSnapshot extends AnyRef
Value Members
- object Children
- object ComponentDom
- object CtorType
- object ModStateFn
- object ModStateWithPropsFn
- object NonEmptyRef
Types:
Types:
Handle
-raw: facade.React.RefHandle[A]
Get
-get: F[A]
Set
-set: A => F[Unit]
Full
-Handle & Set & Get
Simple
- Monomorphic version ofFull
- object PropsChildren
- object React
- object ReactDOM
- object ReactDOMClient
- object ReactDOMServer
- object ReactExtensions
- object ReactMouseEvent
- object ReactOptions
Classes for specifying options for React.
- object Ref
Types:
Types:
Handle
-raw: facade.React.RefHandle[A | Null]
Get
-get: F[Option[A]]
Set
-set: Option[A] => F[Unit]
Full
-Handle & Set & Get
Simple
- Monomorphic version ofFull
- object Renderable extends Serializable
- object Reusability extends ReusabilityMacros with ScalaVersionSpecificReusability
- object Reusable
- object ScalaComponent
- object ScalaJsReactConfig
- object SetStateFn
- object StateAccess
- object StateAccessor extends StateAccessorImplicits
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'stypeclass(i).setState(...): F[Unit]
. - object UpdateSnapshot