Home > @uniformdev/canvas > walkComponentTree

walkComponentTree() function

Warning: This API is now obsolete.

use walkNodeTree

Walks a composition's component tree, visiting each component instance depth-first, in order.

Signature:

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

component

</td><td>

ComponentInstance

</td><td>

</td></tr> <tr><td>

visitor

</td><td>

(component: ComponentInstance<TContext>, currentContext: TContext | undefined) => void

</td><td>

</td></tr> <tr><td>

initialContext

</td><td>

TContext

</td><td>

(Optional)

</td></tr> </tbody></table> Returns:

void