Created
June 14, 2023 01:42
-
-
Save mattrob33/3e8eb23f3a97e8f88491e5d23408cf06 to your computer and use it in GitHub Desktop.
rememberState usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable fun Screen( | |
| url: String | |
| ) { | |
| var count by rememberState { 0 } | |
| val content by rememberState(url) { load(url) } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment