Packages

t

react

ValueConverters

trait ValueConverters extends AnyRef

Mostly obvious converters so you can have a variety of children types and have them convert to ReactNodes as needed.

Watch out for values that need to pass through 2 implicits since double implicit resolution is not supported by scala. So you may think that these conversions should apply but an UndefOr wrapper on the target type means either you need to use js.defined first and then these implicit conversions will apply automatically or you should use .toNode to convert the ReactNode value then let the general implicit create an UndefOr[T]. Just be mindful of implicit conversion rules in scala.

To do

Restructure as a typeclass using an "encoding" pattern, see the trait above :-).

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValueConverters
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit def _stringToElement(s: String): ReactNode
  5. implicit def _stringToUndefOrElement(s: String): UndefOr[ReactNode]
  6. implicit def anyValToElement(v: AnyVal): ReactNode
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. implicit def eitherRightAnyToNode[T](n: Either[_, T])(implicit cvt: (T) => ReactNode): ReactNode
  10. implicit def eitherRightReactNodeToNode(n: Either[_, ReactNode]): ReactNode
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. implicit def func0[T](f: () => Unit): UndefOr[Function0[Unit]]
  14. implicit def func1[A, T](f: (A) => T): UndefOr[Function1[A, T]]
  15. implicit def func2[A, A2, T](f: (A, A2) => T): UndefOr[Function2[A, A2, T]]
  16. implicit def func3[A, A2, A3, T](f: (A, A2, A3) => T): UndefOr[Function3[A, A2, A3, T]]
  17. implicit def func4[A, A2, A3, A4, T](f: (A, A2, A3, A4) => T): UndefOr[Function4[A, A2, A3, A4, T]]
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. implicit def iterableOfNodeToElement(s: Iterable[ReactNode]): ReactNode
  22. implicit def iterableWithConversionToElement[T](s: Iterable[T])(implicit cv: (T) => ReactNode): ReactNode

    Elements should have key set.

    Elements should have key set. Requires an implicit to perform the conversion.

  23. implicit def jsArrayOfNodeToElement[T <: ReactNode](arr: Array[T]): ReactNode
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. implicit def optToElement(s: Option[ReactNode]): ReactNode
  28. implicit def optionAnyValToNull(n: Option[AnyVal]): ReactNode

    Convert scala.AnyVal into a react node.

  29. implicit def optionStringToElement(n: Option[String]): ReactNode

    Since null is a valid react node, convert an optional string to null.

  30. implicit def optionStringToUndefOr(n: Option[String]): UndefOr[String]

    Implicit conversion from Option[String] => js.UndefOr[String].

  31. implicit def optionStringToUndefOrElement(n: Option[String]): UndefOr[ReactNode]

    Since null is a valid react node, convert an optional string to null.

  32. implicit def seqOfNodeToElement(s: Seq[ReactNode]): ReactNode

    Critical to handling varargs in component children lists.

  33. implicit def stringToUndefOrNode(n: UndefOr[String]): ReactNode
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. implicit def throwableToNode(t: Throwable): ReactNode
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. implicit def tryToNode[T](t: Try[T])(implicit cvt: (T) => ReactNode): ReactNode
  38. implicit def undefOrAnyValToElement(v: UndefOr[AnyVal]): ReactNode
  39. implicit def undefOrReactNodeArrayToReactNode(n: UndefOr[Array[ReactNode]]): ReactNode
  40. implicit def undefOrReactNodeToReactNode(n: UndefOr[ReactNode]): ReactNode
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped