findDirectComponentInLithoView

Returns a component of the given class only if the component renders directly to the root component of the LithoView

example:

class FBStory : KComponent() {
override fun ComponentScope.render() {
return Story()
}

findDirectComponentInLithoView will only be able to return Story Component from the LithoView with FBStory as a root

class FBStory : KComponent() {
override fun ComponentScope.render() {
return Column{
child(CommentComponent())
child(AuthorComponent())
}
}
findDirectComponentInLithoView here will only be able to return Column

Returns a component of the given class only if the component renders directly to the root component of the LithoView (for details see: findDirectComponentInLithoView)