Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new HTMLSelect(props: Readonly<P> | P): HTMLSelect
  • new HTMLSelect(props: P, context: any): HTMLSelect

Properties

context

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>
see

https://reactjs.org/docs/context.html

Readonly props

props: Readonly<P> & Readonly<{ children?: ReactNode }>

refs

refs: {}

Type declaration

state

state: Readonly<S>

Optional Static contextType

contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
  static contextType = Ctx
  context!: React.ContextType<typeof Ctx>
  render () {
    return <>My context's value: {this.context}</>;
  }
}
see

https://reactjs.org/docs/context.html#classcontexttype

Methods

Optional UNSAFE_componentWillMount

UNSAFE_componentWillMount:

Optional UNSAFE_componentWillReceiveProps

UNSAFE_componentWillReceiveProps:

Optional UNSAFE_componentWillUpdate

UNSAFE_componentWillUpdate:

Optional componentDidCatch

componentDidCatch:

Optional componentDidMount

componentDidMount:

Optional componentDidUpdate

componentDidUpdate:

Optional componentWillMount

componentWillMount:

Optional componentWillReceiveProps

componentWillReceiveProps:

Optional componentWillUnmount

componentWillUnmount:

Optional componentWillUpdate

componentWillUpdate:

forceUpdate

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

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

    Returns void

Optional getSnapshotBeforeUpdate

getSnapshotBeforeUpdate:

render

  • render(): JSX.Element
  • Returns JSX.Element

setState

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

    • K: never

    Parameters

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

    Returns void

Optional shouldComponentUpdate

shouldComponentUpdate:

Generated using TypeDoc