Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • P = {}

  • S = {}

Hierarchy

Index

Constructors

constructor

  • new Component<P, S>(props?: P, context?: any): Component<P, S>
  • Type parameters

    • P = {}

    • S = {}

    Parameters

    • Optional props: P
    • Optional context: any

    Returns Component<P, S>

Properties

Optional base

base?: Element | Text

context

context: any

props

props: RenderableProps<P, any>

state

state: Readonly<S>

Static Optional contextType

contextType?: Context<any>

Static Optional defaultProps

defaultProps?: any

Static Optional displayName

displayName?: string

Methods

Optional componentDidCatch

  • componentDidCatch(error: any, errorInfo: any): void
  • Parameters

    • error: any
    • errorInfo: any

    Returns void

Optional componentDidMount

  • componentDidMount(): void
  • Returns void

Optional componentDidUpdate

  • componentDidUpdate(previousProps: Readonly<P>, previousState: Readonly<S>, snapshot: any): void
  • Parameters

    • previousProps: Readonly<P>
    • previousState: Readonly<S>
    • snapshot: any

    Returns void

Optional componentWillMount

  • componentWillMount(): void
  • Returns void

Optional componentWillReceiveProps

  • componentWillReceiveProps(nextProps: Readonly<P>, nextContext: any): void
  • Parameters

    • nextProps: Readonly<P>
    • nextContext: any

    Returns void

Optional componentWillUnmount

  • componentWillUnmount(): void
  • Returns void

Optional componentWillUpdate

  • componentWillUpdate(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void
  • Parameters

    • nextProps: Readonly<P>
    • nextState: Readonly<S>
    • nextContext: any

    Returns void

forceUpdate

  • forceUpdate(callback?: () => void): void
  • Parameters

    • Optional callback: () => void
        • (): void
        • Returns void

    Returns void

Optional getChildContext

  • getChildContext(): object
  • Returns object

Optional getSnapshotBeforeUpdate

  • getSnapshotBeforeUpdate(oldProps: Readonly<P>, oldState: Readonly<S>): any
  • Parameters

    • oldProps: Readonly<P>
    • oldState: Readonly<S>

    Returns any

Abstract render

  • render(props?: RenderableProps<P, any>, state?: Readonly<S>, context?: any): ComponentChild
  • Parameters

    • Optional props: RenderableProps<P, any>
    • Optional state: Readonly<S>
    • Optional context: any

    Returns ComponentChild

setState

  • setState<K>(state: null | Partial<S> | ((prevState: Readonly<S>, props: Readonly<P>) => null | Partial<S> | Pick<S, K>) | Pick<S, K>, callback?: () => void): void
  • Type parameters

    • K: string | number | symbol

    Parameters

    • state: null | Partial<S> | ((prevState: Readonly<S>, props: Readonly<P>) => null | Partial<S> | Pick<S, K>) | Pick<S, K>
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns void

Optional shouldComponentUpdate

  • shouldComponentUpdate(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean
  • Parameters

    • nextProps: Readonly<P>
    • nextState: Readonly<S>
    • nextContext: any

    Returns boolean

Static Optional getDerivedStateFromError

  • getDerivedStateFromError(error: any): null | object
  • Parameters

    • error: any

    Returns null | object

Static Optional getDerivedStateFromProps

  • getDerivedStateFromProps(props: object, state: object): null | object
  • Parameters

    • props: object
    • state: object

    Returns null | object

Generated using TypeDoc