How to send data back to the previous screen, in N...
# compose
i
How to send data back to the previous screen, in Nav3 Eg: Form screen, sends data back to calling screen
r
Datasource between view models or add new calling screen with data after form is completed (depend how your handle the state before and after the form screen). Navigation say you only pass keys to fetch data in screens, don't send complex information. Probably someone can help you more xd
i
There are two approaches in the returning a result PR in the nav3-recipes repository you might consider: https://github.com/android/nav3-recipes/pull/65
o
Will Nav3 eventually support this feature out of the box? Or is it out of scope of the library design?
i
Recipes make a lot of sense when there are many ways of doing something and it is up to you to pick the right tool for your specific needs (for example, that PR has both a "results as state" model and "results as events" model - one size does not fit all use cases), but we're definitely looking at what recipes "graduate" to become optional helpers in the library itself over time. Then we'll rewrite the recipe to use the new helper - that way the nav3-recipes repository remains a good source for how to approach specific problems
👍 3
i
Thanks....