May 29 2024
Versions
Simplified way to modify wireframe subcomponents
You can now modify subcomponent wireframes using two patterns:
a. Parentless
- Modifying the subcomponent without its parent within the <VeltWireframe />
component. (recommended)
In this example, we modify the Header subcomponent, which is a subcomponent of the Velt Comment Dialog. In this pattern, we just put the Header subcomponent in the root of <VeltWireframe />
and modify it. We do not need to add its parent component or any of its siblings.
Example:
a. With Parent
- Modifying the subcomponent within the context of its parent within the <VeltWireframe />
component. (not recommended)
In this example, we modify the Header subcomponent, which is a subcomponent of the Velt Comment Dialog component. In this pattern, we include its parent component and siblings. This makes it easier to modify several sibling components at once.
Example:
Parentless
and With Parent
pattern, the With Parent
pattern will override the Parentless
pattern. Detect if Velt SDK is initialized
To detect if the Velt SDK is initialized, subscribe using the following method:
To unsubscribe from the subscription:
You can also the use useVeltInitState()
hook:
Was this page helpful?