onBindHostViewWithDescription
Use this Style instead of onBind to force the binder to be applied on a wrapped HostView.
This Style adds a mount callbacks. The BindFunc is invoked when the HostView is mounted, and it receives a BindScope and the HostView this Component rendered to. The BindFunc must return an UnbindFunc and it must undo any mutations made to the View in the BindFunc. This API can be used to create higher-order Styles.
Even if the Component renders a view this Style will force wrap the content into a HostView. The callbacks are guaranteed to be called on the main thread.
The previous and new values of the deps are compared to check if the callbacks should be invoked again. If the deps are equivalent then the callbacks are not invoked again; if they are not equivalent then UnbindFunc is invoked followed by BindFunc. To invoke the callbacks only once use Unit as deps.
The model of the BindScope receiver is a ModelWithContext type and hence can be safely casted during the execution of the BindFunc.
Parameters
the dependencies that will be compared to check if the binder should be rerun.
the RenderUnit.Binder to be used to bind the model to the View content.
the name of the binder. This is used for debugging purposes.
Deprecated (with error)
onBind must provide the 'deps' parameter to determine whether an existing binder should be re-bound. Use 'Unit' as 'deps' to invoke the binder only once when the component is mounted or 'Any' to invoke the binder every time the component is mounted.