Class MountOptions
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Options passed to Mount(VisualElement, VNode, MountOptions), as
React's createRoot takes an options object.
public sealed record MountOptions
- Inheritance
-
objectMountOptions
Remarks
Each option is an init property, as each is a property of React's options object. React's
onRecoverableError has no counterpart: Velvet neither hydrates nor retries a failed render
synchronously, which are the two recoveries React reports through it.
Properties
- MotionClock
The clock this tree's motion advances on, from its first render on. Realtime by default; GameTime or a clock of the application's own keeps that motion in step with game time. See MotionClock.
- OnCaughtError
Called when an error boundary in this tree catches an error — React's
onCaughtError. It is called in the commit that shows the boundary's fallback, after the fallback's layout effects and before those of the boundary's ancestors; a boundary that an ancestor boundary replaces before that commit reports nothing. A boundary that a time-sliced transition mounted or re-rendered, catching before the transition completes, reports in the commit that completes it, after its own layout effects. It receives the caught exception and an ErrorInfo naming the boundary and carrying the component stack. When null, the error is logged withDebug.LogException, together with the boundary's name and the component stack. An exception the handler throws is logged and does not reach the tree.
- OnUncaughtError
Called when the tree unmounts for an error no error boundary in it caught — React's
onUncaughtError. It is called once the tree has unmounted, with the exception and an ErrorInfo carrying the component stack and an empty ErrorBoundary. An error an effect cleanup throws while that unmount runs is reported after it, and one thrown while Dispose() runs is reported once every cleanup has run. When null, the exception is logged withDebug.LogException, and in the Editor and a development build a warning naming the component that threw follows it, as React's development build warns. An exception the handler throws is logged.