Packages

final class Step1[P] extends AnyRef

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.

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

Instance Constructors

  1. new Step1(name: String)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def getDerivedStateFromPropsAndState[S](f: (P, Option[S]) ⇒ S): Step2[P, S]

    This is called twice when a component is first rendered.

    This is called twice when a component is first rendered. Once with state set to None and then again by React with state set to Some.

    getDerivedStateFromProps is invoked right before calling the render method, both on the initial mount and on subsequent updates.

    This method exists for rare use cases where the state depends on changes in props over time. For example, it might be handy for implementing a Transition component that compares its previous and next children to decide which of them to animate in and out.

    Deriving state leads to verbose code and makes your components difficult to think about. Make sure you're familiar with simpler alternatives:

    • If you need to perform a side effect (for example, data fetching or an animation) in response to a change in props, use componentDidUpdate lifecycle instead.
    • If you want to re-compute some data only when a prop changes, use a memoization helper instead.
    • If you want to "reset" some state when a prop changes, consider either making a component fully controlled or fully uncontrolled with a key instead.

    Note that this method is fired on every render, regardless of the cause. This is in contrast to componentWillReceiveProps, which only fires when the parent causes a re-render and not as a result of a local setState.

  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def initialState[S](s: ⇒ S): Step2[P, S]
  12. def initialStateCallback[S](cb: CallbackTo[S]): Step2[P, S]
  13. def initialStateCallbackFromProps[S](f: (P) ⇒ CallbackTo[S]): Step2[P, S]
  14. def initialStateFromProps[S](f: (P) ⇒ S): Step2[P, S]
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def stateless: Step2[P, Unit]
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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.

  2. def getDerivedStateFromProps[S](f: (P) ⇒ S): Step2[P, S]

    getDerivedStateFromProps is invoked right before calling the render method, both on the initial mount and on subsequent updates.

    getDerivedStateFromProps is invoked right before calling the render method, both on the initial mount and on subsequent updates.

    This method exists for rare use cases where the state depends on changes in props over time. For example, it might be handy for implementing a Transition component that compares its previous and next children to decide which of them to animate in and out.

    Deriving state leads to verbose code and makes your components difficult to think about. Make sure you're familiar with simpler alternatives:

    • If you need to perform a side effect (for example, data fetching or an animation) in response to a change in props, use componentDidUpdate lifecycle instead.
    • If you want to re-compute some data only when a prop changes, use a memoization helper instead.
    • If you want to "reset" some state when a prop changes, consider either making a component fully controlled or fully uncontrolled with a key instead.

    Note that this method is fired on every render, regardless of the cause. This is in contrast to componentWillReceiveProps, which only fires when the parent causes a re-render and not as a result of a local setState.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.7.1) Use getDerivedStateFromPropsAndState instead. This doesn't just get called when props change, it gets called when state changes too; meaning it gets reset every time you call setState (!)

Inherited from AnyRef

Inherited from Any

Ungrouped