Object

japgolly.scalajs.react.component.builder

Builder

Related Doc: package builder

Permalink

object Builder

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

Type Members

  1. type Config[P, C <: Children, S, B, US <: UpdateSnapshot, US2 <: UpdateSnapshot] = (Step4[P, C, S, B, US]) ⇒ Step4[P, C, S, B, US2]

    Permalink
  2. type InitStateFn[-P, +S] = (Box[P]) ⇒ Box[S]

    Permalink
  3. type NewBackendFn[P, S, B] = (Scala.BackendScope[P, S]) ⇒ B

    Permalink
  4. type RenderFn[P, S, B] = (RenderScope[P, S, B]) ⇒ VdomNode

    Permalink
  5. final class Step1[P] extends AnyRef

    Permalink

    You're on step 1/4 on the way to building a component.

    You're on step 1/4 on the way to building a component.

    If your component is to be stateful, here you must specify it's initial state.

    If your component is to be stateless, you can skip this step or explicitly use .stateless.

  6. final class Step2[P, S] extends AnyRef

    Permalink

    You're on step 2/4 on the way to building a component.

    You're on step 2/4 on the way to building a component.

    Here you specify whether your component has a "backend" or not. A backend like a class that is created when your component mounts and remains until it is unmounted.

    If you don't need a backend, you can skip this step or explicitly use .noBackend.

    Making common cases convenient, you can even use .renderBackend or .renderBackendWithChildren to take care of both this and the following step automatically, using macros to save you typing boring boilerplate. If you have an unhealthy fear of macros you can ignore then and do it all manually too; the macros don't have any special privileges.

  7. final class Step3[P, S, B] extends AnyRef

    Permalink

    You're on step 3/4 on the way to building a component.

    You're on step 3/4 on the way to building a component.

    Here you specify your component's render function. For convenience there are a plethoria of methods you can call that all do the same thing but accept the argument in different shapes; the suffixes in method names refer to the argument type(s). This means you choose the method that provides the types that you need, rather than having to manually specify the types for all arguments including stuff you don't need.

    If you're using a backend, then it's highly recommended that you put your render function in the backend. When you do that, make sure it's called .render and then here in the builder, use the .renderBackend or .renderBackendWithChildren methods which will use a macro to inspect your backend's render method and provide everything it needs automatically.

  8. final class Step4[P, C <: Children, S, B, US <: UpdateSnapshot] extends AnyRef

    Permalink

    You're on the final step on the way to building a component.

    You're on the final step on the way to building a component.

    This is where you add lifecycle callbacks if you need to.

    When you're done, simply call .build to create and return your ScalaComponent.

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. implicit def defaultToNoBackend[X, P, S](b: X)(implicit ev: (X) ⇒ Step2[P, S]): Step3[P, S, Unit]

    Permalink
  7. implicit def defaultToNoState[P](b: Step1[P]): Step2[P, Unit]

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fromReactComponentClass[P, C <: Children, S, B](rc: ComponentClass[Box[P], Box[S]])(implicit ctorType: Summoner[Box[P], C]): Component[P, S, B, CT]

    Permalink
  12. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  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. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped