Packages

t

react

ReactJS

trait ReactJS extends Object with Concurrent

Annotations
@JSType() @native()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReactJS
  2. Concurrent
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. val Children: Children
  2. val Component: Dynamic

    We are not importing this to be used in a class oriented way.

  3. val Fragment: ReactJSComponent
  4. val StrictMode: ReactJSComponent
  5. val Suspense: ReactJSComponent
  6. val SuspenseList: ReactJSComponent
    Definition Classes
    Concurrent
  7. def cloneElement(el: ReactElement, props: Dynamic): ReactDOMElement
  8. def createContext[T](defaultValue: T, calculateChangedBits: UndefOr[Function2[T, T, Int]]): ReactContext[T]
  9. def createElement(el: ReactType, props: Any, children: ReactNode*): ReactElement

    Can take a wide variety of types for tpe: string | sfc | class (extending React.Component).

    Can take a wide variety of types for tpe: string | sfc | class (extending React.Component). P is kept very general here and public APIs should customize as needed. Props is js.Any to force public APIs to think about the props type before casting. Children can be in the props as well if I recall correctly so the varags is a convenience.

  10. def createMutableSource[S](source: Any, getVersion: Function0[Any]): MutableSource[S]
    Definition Classes
    Concurrent
  11. def createRef[T](): ReactRef[T]

    Create a ref to be assigned to a "ref" property on a component.

  12. def forwardRef[T](): Object
  13. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  14. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  15. def isValidElement(obj: Object): Boolean
  16. def lazy(lazyComponent: DynamicImportThunk): ReactJSLazyComponent

    Returns a "lazy" react component i.e.

    Returns a "lazy" react component i.e. $$type = react.lazy

  17. def memo[P](f: Function1[P, ReactNode], compare: UndefOr[Function2[Any, Any, Boolean]] = js.undefined): Function1[P, ReactElement]

    Takes a function component and optional props comparison func.

    Takes a function component and optional props comparison func. This returns a function component as this is an HOC. The returned component still needs to be wrapped properly to use with this facade. P is kept general here but should be customized in the public API.

  18. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  19. def toLocaleString(): String
    Definition Classes
    Object
  20. def useDeferredValue(value: Any, config: DeferredValueConfig): Any
    Definition Classes
    Concurrent
  21. def useMutableSource[S, A](source: MutableSource[S], getSnapshot: Function1[S, A], subscribe: Function2[S, Function0[Unit], Function0[Unit]]): A

    subscribe 2nd arg is to be called whenever the value changes and is stable.

    subscribe 2nd arg is to be called whenever the value changes and is stable. Last is an unsubscribe for unmounting.

    Definition Classes
    Concurrent
  22. def useTransition(config: TransitionConfig): Tuple2[Function1[Function0[Unit], Unit], Boolean]
    Definition Classes
    Concurrent
  23. def valueOf(): Any
    Definition Classes
    Object
  24. val version: String