Options
All
  • Public
  • Public/Protected
  • All
Menu

Type Parameters

  • P = {}

  • S = {}

Hierarchy

Index

Constructors

  • 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

base?: Element | Text
context: any
props: RenderableProps<P, any>
state: Readonly<S>
contextType?: Context<any>
defaultProps?: any
displayName?: string

Methods

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

    • error: any
    • errorInfo: ErrorInfo

    Returns void

  • componentDidMount(): void
  • Returns void

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

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

    Returns void

  • componentWillMount(): void
  • Returns void

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

    • nextProps: Readonly<P>
    • nextContext: any

    Returns void

  • componentWillUnmount(): void
  • Returns void

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

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

    Returns void

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

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

    Returns void

  • getChildContext(): object
  • Returns object

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

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

    Returns any

  • 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<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 extends 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

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

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

    Returns boolean

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

    • error: any

    Returns null | object

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

    • props: object
    • state: object

    Returns null | object

Generated using TypeDoc