How best to pass event down from a parent presenter to a child presenter #1751
Unanswered
ElliotSknr
asked this question in
Q&A
Replies: 1 comment
-
I would make your home scaffold be backed by a presenter that is composed of its nested presenters. You can then pass state to their current states' sinks. You can't pass state through |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently have a setup where I create a navigator and provide it to
NavigableCircuitContent
at the root of my application. The initial screen, let's call itHomeScreen
launches another CircuitContent(), providing the existing navigator to this function. Within the home screen I have a scaffold which displays a bottom bar with nav destinations that are swapped out in the via theCircuitContent
's screen parameter.The trouble I am having is how best to inform one of these child screens/presenter that the navbar has been pressed in the event that the navbar is clicked on the currently active tab, where I would want to perform a custom action such as refresh of content or scroll to the top of the child screen.
I access a kotlin object between these presenters to listen to this, but I was hoping to first understand if there is a more idiomatic way to perform this within circuit.
Root
Home Presenter
Home Ui
Beta Was this translation helpful? Give feedback.
All reactions