Pass a Parcelable Object with Navigation Compose | 2 Different Approaches

Pass a Parcelable Object with Navigation Compose | 2 Different Approaches

Stevdza-San

2 года назад

16,870 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Aaditya Paithane
Aaditya Paithane - 15.09.2023 13:15

Very helpful tutorial, works smoothly, second way is better than using Parcelable, in my opinion!

Ответить
Ahmed Guedmioui
Ahmed Guedmioui - 23.07.2023 18:29

thanks

Ответить
Nontas Papadopoulos
Nontas Papadopoulos - 28.06.2023 10:28

The second way seems good but im wondering what happens if you have multiple events, and fields in each screen? Wouldn't the view model become too big and unmaintainable ?

Ответить
Nour Morgan
Nour Morgan - 25.04.2023 04:27

What do you think about compose destinations library , is it reliable ?

Ответить
dj pharaoh of time
dj pharaoh of time - 06.03.2023 20:47

How would you use the result in the detail screen ( to set values of textfields)?

Ответить
enes tığlı
enes tığlı - 09.02.2023 12:59

can you share source code ?

Ответить
numel arredcr
numel arredcr - 27.01.2023 11:47

How to show that Object passed in the DetailsScreen ?Gracias.

Ответить
Games For U
Games For U - 31.10.2022 16:56

Really I was searching for a solution for this issue a long time ago, Thanks a lot Stevdza-San for your efforts in Jetpack Compose.

Ответить
Mr B Mr O
Mr B Mr O - 30.10.2022 16:36

From what I have read, you should NEVER pass in a viewModel to composable functions. Instead, you should obtain them inside the composable function. Secondly, a shared viewModel I guess has to be managed wisely. Are you not better off using SavedStateHandle, that is supplied to all ViewModels? this has a key value pair

Ответить
Roony Shekho
Roony Shekho - 23.10.2022 13:27

The second way is the best one. Thank you very much for your video!

Ответить
Elie Danhash
Elie Danhash - 23.08.2022 14:06

you're the best of the best :)

Ответить
Chris Athanas
Chris Athanas - 08.08.2022 04:03

Is there a GitHub repo with this code?

Ответить
Roni Kurnia
Roni Kurnia - 06.05.2022 19:38

Great tutorial, straight forward, easy to understand, thank you

Ответить
Emmanuel Pregnolato
Emmanuel Pregnolato - 28.04.2022 02:31

That was really informative.
Ty Stev

Ответить
Raymond Michael
Raymond Michael - 16.04.2022 20:20

Hello there, can you create a tutorial on how we can add mongodb realm with sync, using compose,
No much resources for it, your teaching is really good

Ответить
Muhammad Irfan Adil
Muhammad Irfan Adil - 16.04.2022 13:55

Why do android libraries and methods keep changing? It's a lot frustrating to learn new ways every month,

Ответить
Ibrahim Al-Zaidi
Ibrahim Al-Zaidi - 14.04.2022 15:58

Great content, if you can provide a full explain of using a viewModel to manage the state of the composable.

Ответить
Morpheus Φ
Morpheus Φ - 13.04.2022 15:24

Will you make a course on building multi module app?

Ответить
mohammed abusnaimeh
mohammed abusnaimeh - 13.04.2022 15:11

I am find another approach like convert object To Json !! is this way correct ?

Ответить
Anudeep Ananth
Anudeep Ananth - 13.04.2022 13:27

I guess a shared viewModel is the best way to share data across composables. any memory issues though if we use shared viewModels instead of passing a parceable ?

Ответить
Siarhei Sudakou
Siarhei Sudakou - 13.04.2022 11:23

Using SharedViewModel is a good universal approach. Thanks for the idea and example!

Ответить
schtscherbakow
schtscherbakow - 13.04.2022 10:44

If I have two screens with complex logic or are in different modules, what should I do with the viewmodel? Create another shared module for the viewmodel? Let Google go to hell with their viewmodel! A shame! The proposed data transfer method in Compose is complete crap. Why couldn't the data transfer be done normally? Shared viewmodel is evil!

Ответить
ArenaHax
ArenaHax - 13.04.2022 10:28

Please make tuts on realmsync

Ответить
Seb
Seb - 13.04.2022 00:04

if I want to make a search app by category, I have to make them parcelable or otherwise?

Ответить
19BME031 Ansharah Laraib
19BME031 Ansharah Laraib - 12.04.2022 20:08

Thanks a lot for this!!
Great content

Ответить