Jetpack Compose Navigation | HILT | View Model | SavedStateHandle | CheezyCode Hindi

  Рет қаралды 9,705

Cheezy Code

Cheezy Code

Жыл бұрын

Learn Jetpack Compose in Android. Learn Navigation basics in Compose. Learn how to use savedstatehandle for accessing nav arguments in a viewmodel. We have used hiltViewModel() function to create viewmodels inside composable since we are using HILT to create viewmodels. NavArguments passed while navigating between screens in navigation component are also stored in SavedStateHandle. NavBackStackEntry class stores the navarguments in savedstatehandle while navigating between screens. Using this object, we can access the arguments inside viewmodels. Learn this step by step - how to setup navigation framework using Jetpack Compose Composable Functions.
Learn how to setup a project from scratch in this video. We will be covering a lot. Learn how to get the data using ChatGPT - good example of using ChatGPT for data curation. You can use this for any category of data you want. This is a simple example and opens a huge opportunity for you to add features. Learn how to define composables using best practices. Everything is explained in Hindi (हिन्दी)
Topics covered -
1. Setup Navigation in Jetpack Compose.
2. Navigate between Compose Screens.
3. How to pass nav arguments using SavedStateHandle.
4. Use of hiltViewModel(), create viewmodels in composable functions.
5. Jetpack Compose Project with MVVM setup video.
Jetpack Compose Series -
• Android Jetpack Compos...
Kotlin Flows Playlist -
• Kotlin Flows Tutorials
Jetpack Paging Tutorial -
• Android Paging 3 | Jet...
Complete Dependency Injection Playlist Link -
• Dagger 2 - Dependency ...
Complete Android Architecture Components Playlist -
• Android Architecture C...
Beginner series in Android Playlist (Hindi) -
• Android Tutorials Step...
Kotlin Beginners Tutorial Series -
• Kotlin Beginner Tutori...
For more info - visit the below link
www.cheezycode.com
We are social. Follow us at -
Facebook - / cheezycode
Twitter - / cheezycode
Instagram - / cheezycode

Пікірлер: 33
@m.arslankhan7449
@m.arslankhan7449 4 күн бұрын
Amazing
@user-xf3lu5en6f
@user-xf3lu5en6f 7 ай бұрын
Hey Cheesy, Please make a video on CICD for deployment of app to Firebase App Distribution and Play Console ✌
@salmanjawed98
@salmanjawed98 Жыл бұрын
Amazing video and helps understand some tricky areas
@salmanjawed98
@salmanjawed98 Жыл бұрын
1 suggestion. We can also hoist viewmodel and use a separate composable which only renders view state to help with previews 😊
@rizwanhashmi4116
@rizwanhashmi4116 7 ай бұрын
Awesome 🤗
@samirgawas
@samirgawas Жыл бұрын
Thank you @cheezyCode for this playlist❤. Are any more videos coming to this playlist?
@CheezyCode
@CheezyCode Жыл бұрын
Yes
@HardikPatel-iw7ju
@HardikPatel-iw7ju 23 күн бұрын
Hey Cheesy, How can we pass the custom object as navigation param?
@rishikeshsingh9946
@rishikeshsingh9946 Жыл бұрын
Continue watching 🎉🎉❤Thanku sir
@CheezyCode
@CheezyCode Жыл бұрын
Thank you ☺️
@pushprajsingh595
@pushprajsingh595 10 ай бұрын
Your tutorials are amazing 🎉, can you please use dark theme for ide it's really painful to see light colours on code. Thanks in advance
@cocktailpatil5012
@cocktailpatil5012 Жыл бұрын
Can we pass DataClass Object/HashMap/ as an argument?
@kishorramani007
@kishorramani007 Жыл бұрын
hi Jatinbhai, mere me lamda vala "it" and other suggestion nahi aa rahe hai android studio me, might be setting change ho gayi ho. setting enable karne ka koi idea ho to batao.
@user-zh5il3gg6v
@user-zh5il3gg6v 7 ай бұрын
Please tell me, what are the sources of the example on github? I am interested in how to properly inject and mark repository / interactor so that they can be injected
@sukhwantsingh501
@sukhwantsingh501 10 ай бұрын
What if we want to add viewpager in the screen with different fragments in compose.
@mandeepbhalothia7626
@mandeepbhalothia7626 Жыл бұрын
We should be able to create the viewmodel instance in a composable without hilt. May be need to dig more of what happened
@CheezyCode
@CheezyCode Жыл бұрын
In the previous video, viewmodel was created without HILT - you can refer that video
@user-rg7qr7kw1z
@user-rg7qr7kw1z Жыл бұрын
Please provide this code with Effect Handlers jetpack compose.
@salmanjawed98
@salmanjawed98 Жыл бұрын
Can you share repository for this code?
@user-is9qv3it3u
@user-is9qv3it3u 10 ай бұрын
I think we can also pass data in DetailsScreen like this DetailsScreen(category) and in DetailsScreen function we call viewModel.fetcheCategoryTweets(category). This approach we can also right??
@mayanksinghal6674
@mayanksinghal6674 6 ай бұрын
that would not be saved during configuration change
@joelposhapir3737
@joelposhapir3737 Жыл бұрын
After completing app plzz provide source code...
@sandipmedhe1201
@sandipmedhe1201 Жыл бұрын
Hello Sir Sometimes what what happenes when we make call of service it gets call two or three times in compose I don't know why it happens and how to stop doing that. So could you please make a video on best practices to avoid that recomposition?
@CheezyCode
@CheezyCode Жыл бұрын
Effect Handlers is the way to solve this issue
@mehmettekin9142
@mehmettekin9142 Жыл бұрын
Why not in English language ?
@priyamprakash1209
@priyamprakash1209 3 күн бұрын
There are tons of videos in English and Hindi is untouched
@rishabhsaraswat1928
@rishabhsaraswat1928 11 ай бұрын
you are doing it the wrong way. according to compose documentation, composable function must never know about viewmodels and you must always pass the info as parameter and handle the updates. you coult also assign an id to each item in grid to make recomposition better
@CheezyCode
@CheezyCode 11 ай бұрын
Top level composables need access
@rishabhsaraswat1928
@rishabhsaraswat1928 11 ай бұрын
So it must be provided via parameters. Yes I know that it becomes very hectic but I one of Google's sample they did this. In Google summit they said that compose must be as independent as possible. For testing, passing a string is better than passing a viewmodel. If you are following that approach get viewmodel from parameters so that it's not initialised on every recomposition
@CheezyCode
@CheezyCode 11 ай бұрын
Viewmodel stays for the lifetime based on the scope...it won't be reinitialised
@mayanksinghal6674
@mayanksinghal6674 6 ай бұрын
@@rishabhsaraswat1928 please share the google's sample link
Best practices for saving UI state on Android
20:36
Android Developers
Рет қаралды 38 М.
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,3 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 104 МЛН
【Fuel】Rest API Client with Android + Jetpack Compose
8:53
kenmaro's prototyping
Рет қаралды 1,9 М.
Type-Safe Navigation with the OFFICIAL Compose Navigation Library
10:03
Employee No.1 - Standup Comedy by Abhishek Upmanyu | Story
40:15
Abhishek Upmanyu
Рет қаралды 25 МЛН
Hilt - Providing Retrofit Instance and Repository
20:36
CodingWithMitch
Рет қаралды 18 М.
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 74 М.
Hilt Dependency Injection (Kotlin Beginner Example)
21:20
CodingWithMitch
Рет қаралды 42 М.
Hilt - лёгкий старт в Dagger
32:26
Android Broadcast. Все об Андроид разработке
Рет қаралды 14 М.
Custom layouts and graphics in Compose
20:25
Android Developers
Рет қаралды 51 М.