@uservane/agent-react: UserVaneErrorBoundary
Class: UserVaneErrorBoundary
Section titled “Class: UserVaneErrorBoundary”Defined in: @[email protected]_react@19.2.3/node_modules/@uservane/agent-react/dist/index.d.ts:35
Internal error boundary for the agent-native React surface. A render throw inside InlineFeedback / provider subtree must never reach the host chat tree (design section 3 render + section 9).
Extends
Section titled “Extends”Component<Props,State>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UserVaneErrorBoundary(
props):UserVaneErrorBoundary
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1016
Parameters
Section titled “Parameters”Props
Returns
Section titled “Returns”UserVaneErrorBoundary
Inherited from
Section titled “Inherited from”Component<Props, State>.constructor
Constructor
Section titled “Constructor”new UserVaneErrorBoundary(
props,context):UserVaneErrorBoundary
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1021
Parameters
Section titled “Parameters”Props
context
Section titled “context”any
Returns
Section titled “Returns”UserVaneErrorBoundary
Deprecated
Section titled “Deprecated”Inherited from
Section titled “Inherited from”Component<Props, State>.constructor
Properties
Section titled “Properties”context
Section titled “context”context:
unknown
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1014
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.
Example
Section titled “Example”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>Inherited from
Section titled “Inherited from”Component.context
readonlyprops:Readonly<P>
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1034
Inherited from
Section titled “Inherited from”Component.props
refs:
object
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1041
Index Signature
Section titled “Index Signature”[key: string]: ReactInstance
Deprecated
Section titled “Deprecated”Inherited from
Section titled “Inherited from”Component.refs
state:
State
Defined in: @[email protected]_react@19.2.3/node_modules/@uservane/agent-react/dist/index.d.ts:36
Overrides
Section titled “Overrides”Component.state
contextType?
Section titled “contextType?”
staticoptionalcontextType?:Context<any>
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:996
If set, this.context will be set at runtime to the current value of the given Context.
Example
Section titled “Example”type MyContext = numberconst 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}</>; }}https://react.dev/reference/react/Component#static-contexttype
Inherited from
Section titled “Inherited from”Component.contextType
Methods
Section titled “Methods”componentDidCatch()
Section titled “componentDidCatch()”componentDidCatch(
error,info):void
Defined in: @[email protected]_react@19.2.3/node_modules/@uservane/agent-react/dist/index.d.ts:38
Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
Parameters
Section titled “Parameters”Error
ErrorInfo
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Component.componentDidCatch
componentDidMount()?
Section titled “componentDidMount()?”
optionalcomponentDidMount():void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1377
Called immediately after a component is mounted. Setting state here will trigger re-rendering.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Component.componentDidMount
componentDidUpdate()?
Section titled “componentDidUpdate()?”
optionalcomponentDidUpdate(prevProps,prevState,snapshot?):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1440
Called immediately after updating occurs. Not called for the initial render.
The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.
Parameters
Section titled “Parameters”prevProps
Section titled “prevProps”Readonly<P>
prevState
Section titled “prevState”Readonly<S>
snapshot?
Section titled “snapshot?”any
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Component.componentDidUpdate
componentWillMount()?
Section titled “componentWillMount()?”
optionalcomponentWillMount():void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1456
Called immediately before mounting occurs, and before Component.render. Avoid introducing any side-effects or subscriptions in this method.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use ComponentLifecycle.componentDidMount componentDidMount or the constructor instead; will stop working in React 17
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.componentWillMount
componentWillReceiveProps()?
Section titled “componentWillReceiveProps()?”
optionalcomponentWillReceiveProps(nextProps,nextContext):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1487
Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.
Calling Component.setState generally does not trigger this method.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Parameters
Section titled “Parameters”nextProps
Section titled “nextProps”Readonly<P>
nextContext
Section titled “nextContext”any
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use static StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps instead; will stop working in React 17
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.componentWillReceiveProps
componentWillUnmount()?
Section titled “componentWillUnmount()?”
optionalcomponentWillUnmount():void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1393
Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
cancelled network requests, or cleaning up any DOM elements created in componentDidMount.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Component.componentWillUnmount
componentWillUpdate()?
Section titled “componentWillUpdate()?”
optionalcomponentWillUpdate(nextProps,nextState,nextContext):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1519
Called immediately before rendering when new props or state is received. Not called for the initial render.
Note: You cannot call Component.setState here.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Parameters
Section titled “Parameters”nextProps
Section titled “nextProps”Readonly<P>
nextState
Section titled “nextState”Readonly<S>
nextContext
Section titled “nextContext”any
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.componentWillUpdate
forceUpdate()
Section titled “forceUpdate()”forceUpdate(
callback?):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1031
Parameters
Section titled “Parameters”callback?
Section titled “callback?”() => void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Component.forceUpdate
getSnapshotBeforeUpdate()?
Section titled “getSnapshotBeforeUpdate()?”
optionalgetSnapshotBeforeUpdate(prevProps,prevState):any
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1434
Runs before React applies the result of Component.render render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before Component.render render causes changes to it.
Note: the presence of this method prevents any of the deprecated lifecycle events from running.
Parameters
Section titled “Parameters”prevProps
Section titled “prevProps”Readonly<P>
prevState
Section titled “prevState”Readonly<S>
Returns
Section titled “Returns”any
Inherited from
Section titled “Inherited from”Component.getSnapshotBeforeUpdate
render()
Section titled “render()”render():
ReactNode
Defined in: @[email protected]_react@19.2.3/node_modules/@uservane/agent-react/dist/index.d.ts:39
Returns
Section titled “Returns”ReactNode
Overrides
Section titled “Overrides”Component.render
setState()
Section titled “setState()”setState<
K>(state,callback?):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1026
Type Parameters
Section titled “Type Parameters”K extends "hasError"
Parameters
Section titled “Parameters”State | ((prevState, props) => State | Pick<State, K>) | Pick<State, K>
callback?
Section titled “callback?”() => void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Component.setState
shouldComponentUpdate()?
Section titled “shouldComponentUpdate()?”
optionalshouldComponentUpdate(nextProps,nextState,nextContext):boolean
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1388
Called to determine whether the change in props and state should trigger a re-render.
Component always returns true.
PureComponent implements a shallow comparison on props and state and returns true if any
props or states have changed.
If false is returned, Component.render, componentWillUpdate
and componentDidUpdate will not be called.
Parameters
Section titled “Parameters”nextProps
Section titled “nextProps”Readonly<P>
nextState
Section titled “nextState”Readonly<S>
nextContext
Section titled “nextContext”any
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Component.shouldComponentUpdate
UNSAFE_componentWillMount()?
Section titled “UNSAFE_componentWillMount()?”
optionalUNSAFE_componentWillMount():void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1471
Called immediately before mounting occurs, and before Component.render. Avoid introducing any side-effects or subscriptions in this method.
This method will not stop working in React 17.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use ComponentLifecycle.componentDidMount componentDidMount or the constructor instead
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.UNSAFE_componentWillMount
UNSAFE_componentWillReceiveProps()?
Section titled “UNSAFE_componentWillReceiveProps()?”
optionalUNSAFE_componentWillReceiveProps(nextProps,nextContext):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1505
Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.
Calling Component.setState generally does not trigger this method.
This method will not stop working in React 17.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Parameters
Section titled “Parameters”nextProps
Section titled “nextProps”Readonly<P>
nextContext
Section titled “nextContext”any
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use static StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps instead
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.UNSAFE_componentWillReceiveProps
UNSAFE_componentWillUpdate()?
Section titled “UNSAFE_componentWillUpdate()?”
optionalUNSAFE_componentWillUpdate(nextProps,nextState,nextContext):void
Defined in: @[email protected]/node_modules/@types/react/index.d.ts:1535
Called immediately before rendering when new props or state is received. Not called for the initial render.
Note: You cannot call Component.setState here.
This method will not stop working in React 17.
Note: the presence of NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate or StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps prevents this from being invoked.
Parameters
Section titled “Parameters”nextProps
Section titled “nextProps”Readonly<P>
nextState
Section titled “nextState”Readonly<S>
nextContext
Section titled “nextContext”any
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”16.3, use getSnapshotBeforeUpdate instead
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
- https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
Inherited from
Section titled “Inherited from”Component.UNSAFE_componentWillUpdate
getDerivedStateFromError()
Section titled “getDerivedStateFromError()”
staticgetDerivedStateFromError():State
Defined in: @[email protected]_react@19.2.3/node_modules/@uservane/agent-react/dist/index.d.ts:37
Returns
Section titled “Returns”State