Class

japgolly.scalajs.react.component.builder.Builder

Step4

Related Doc: package Builder

Permalink

final class Step4[P, C <: Children, S, B] extends AnyRef

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.

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

Instance Constructors

  1. new Step4(name: String, initStateFn: InitStateFn[P, S], backendFn: NewBackendFn[P, S, B], renderFn: RenderFn[P, S, B], lifecycle: Lifecycle[P, S, B])

    Permalink

Type Members

  1. type This = Step4[P, C, S, B]

    Permalink

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 build(implicit ctorType: Summoner[Box[P], C]): Component[P, S, B, CT]

    Permalink

    This is the end of the road for this component builder.

    This is the end of the road for this component builder.

    returns

    Your brand-new, spanking, ScalaComponent. Mmmmmmmm, new-car smell.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def componentDidCatch(f: ComponentDidCatchFn[P, S, B]): This

    Permalink

    Error boundaries are React components that catch errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.

    Error boundaries are React components that catch errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.

    Note: "CHILD COMPONENT TREE". Components cannot catch errors in themselves, only their children.

  8. def componentDidCatchConst(cb: Callback): This

    Permalink
  9. def componentDidMount(f: ComponentDidMountFn[P, S, B]): This

    Permalink

    Invoked once, only on the client (not on the server), immediately after the initial rendering occurs.

    Invoked once, only on the client (not on the server), immediately after the initial rendering occurs. At this point in the lifecycle, the component has a DOM representation which you can access via ReactDOM.findDOMNode(this). The componentDidMount() method of child components is invoked before that of parent components.

    If you want to integrate with other JavaScript frameworks, set timers using setTimeout or setInterval, or send AJAX requests, perform those operations in this method.

  10. def componentDidMountConst(cb: Callback): This

    Permalink
  11. def componentDidUpdate(f: ComponentDidUpdateFn[P, S, B]): This

    Permalink

    Invoked immediately after the component's updates are flushed to the DOM.

    Invoked immediately after the component's updates are flushed to the DOM. This method is not called for the initial render.

    Use this as an opportunity to operate on the DOM when the component has been updated.

  12. def componentDidUpdateConst(cb: Callback): This

    Permalink
  13. def componentWillMount(f: ComponentWillMountFn[P, S, B]): This

    Permalink

    Invoked once, both on the client and server, immediately before the initial rendering occurs.

    Invoked once, both on the client and server, immediately before the initial rendering occurs. If you call setState within this method, render() will see the updated state and will be executed only once despite the state change.

  14. def componentWillMountConst(cb: Callback): This

    Permalink
  15. def componentWillReceiveProps(f: ComponentWillReceivePropsFn[P, S, B]): This

    Permalink

    Invoked when a component is receiving new props.

    Invoked when a component is receiving new props. This method is not called for the initial render.

    Use this as an opportunity to react to a prop transition before render() is called by updating the state using this.setState(). The old props can be accessed via this.props. Calling this.setState() within this function will not trigger an additional render.

    Note: There is no analogous method componentWillReceiveState. An incoming prop transition may cause a state change, but the opposite is not true. If you need to perform operations in response to a state change, use componentWillUpdate.

  16. def componentWillReceivePropsConst(cb: Callback): This

    Permalink
  17. def componentWillUnmount(f: ComponentWillUnmountFn[P, S, B]): This

    Permalink

    Invoked immediately before a component is unmounted from the DOM.

    Invoked immediately before a component is unmounted from the DOM.

    Perform any necessary cleanup in this method, such as invalidating timers or cleaning up any DOM elements that were created in componentDidMount.

  18. def componentWillUnmountConst(cb: Callback): This

    Permalink
  19. def componentWillUpdate(f: ComponentWillUpdateFn[P, S, B]): This

    Permalink

    Invoked immediately before rendering when new props or state are being received.

    Invoked immediately before rendering when new props or state are being received. This method is not called for the initial render.

    Use this as an opportunity to perform preparation before an update occurs.

    Note: You *cannot* use this.setState() in this method. If you need to update state in response to a prop change, use componentWillReceiveProps instead.

  20. def componentWillUpdateConst(cb: Callback): This

    Permalink
  21. def configure(fs: Config[P, C, S, B]*): This

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  28. val name: String

    Permalink
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  32. def shouldComponentUpdate(f: ShouldComponentUpdateFn[P, S, B]): This

    Permalink

    Invoked before rendering when new props or state are being received.

    Invoked before rendering when new props or state are being received. This method is not called for the initial render or when forceUpdate is used.

    Use this as an opportunity to return false when you're certain that the transition to the new props and state will not require a component update.

    If shouldComponentUpdate returns false, then render() will be completely skipped until the next state change. In addition, componentWillUpdate and componentDidUpdate will not be called.

    By default, shouldComponentUpdate always returns true to prevent subtle bugs when state is mutated in place, but if you are careful to always treat state as immutable and to read only from props and state in render() then you can override shouldComponentUpdate with an implementation that compares the old props and state to their replacements.

    If performance is a bottleneck, especially with dozens or hundreds of components, use shouldComponentUpdate to speed up your app.

  33. def shouldComponentUpdateConst(b: Boolean): This

    Permalink
  34. def shouldComponentUpdateConst(cb: CallbackTo[Boolean]): This

    Permalink
  35. def shouldComponentUpdatePure(f: (ShouldComponentUpdate[P, S, B]) ⇒ Boolean): This

    Permalink

    Invoked before rendering when new props or state are being received.

    Invoked before rendering when new props or state are being received. This method is not called for the initial render or when forceUpdate is used.

    Use this as an opportunity to return false when you're certain that the transition to the new props and state will not require a component update.

    If shouldComponentUpdate returns false, then render() will be completely skipped until the next state change. In addition, componentWillUpdate and componentDidUpdate will not be called.

    By default, shouldComponentUpdate always returns true to prevent subtle bugs when state is mutated in place, but if you are careful to always treat state as immutable and to read only from props and state in render() then you can override shouldComponentUpdate with an implementation that compares the old props and state to their replacements.

    If performance is a bottleneck, especially with dozens or hundreds of components, use shouldComponentUpdate to speed up your app.

  36. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped