Jetpack Compose Side-Effects

Published: 19 March 2023
on channel: NhatVM
2,768
64

Jetpack compose cung cấp một số side-effect APIs để giúp chúng ta làm việc với các function, class bên ngoài.
LaunchedEffect : cung cấp một CoroutineScope và có thể thực hiện với các key truyền vào. LaunchedEffect đặc biệt hay được sử dụng với key là true hoặc Unit.
DisposableEffect: cung cấp cho bạn API để có thể dọn dẹp khi composable thoát khỏi composition.
rememberCoroutineScope: cung cấp cho bạn 1 CoroutineScope để có thể gọi đến các suspend function
derivedStateOf: giúp bạn chuyển đổi một hoặc nhiều states sang một state mới.
SideEffect: API cho phép chia sẻ state với một class ngoài composable.

Github : https://github.com/frank-nhatvm/jetpa...

00 - Giới thiệu
05:15 - LaunchedEffect
12:50 - DisposableEffect
24:10 - derivedStateOf
31:47 - rememberCoroutineScope
38:52 - SideEffect
47:02 - produceState
49:20 snapShotFlow
51:03 rememberUpdatedState


On this page of the site you can watch the video online Jetpack Compose Side-Effects with a duration of hours minute second in good quality, which was uploaded by the user NhatVM 19 March 2023, share the link with friends and acquaintances, this video has already been watched 2,768 times on youtube and it was liked by 64 viewers. Enjoy your viewing!