Skip to content

Nested Presenters #307

Answered by ZacSweers
hscissors asked this question in Q&A
Nov 29, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

A nested presenter would just be a presenter that is presented directly by another presenter

class MyPresenter : Presenter<State> {
  private val nestedPresenter = NestedPresenter()

  @Composable
  override fun present(): State {
    val nestedState = nestedPresenter.present()
    // Do whatever you need with nestedState, such as tunneling it in your parent State or reading information out of it
    return State(...)
  }
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ZacSweers
Comment options

You must be logged in to vote
2 replies
@ZacSweers
Comment options

@ZacSweers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants