Alex Goldman
10/26/2023, 9:25 PM//parent composable
fun Foo(listItems: SnapshotStateList<Bar>) {
val context = LocalContext.current
val dataStore = Foo(context)
val scope = rememberCoroutineScope()
var FooBarState by remember {
mutableStateOf("")
}
//child composable that needs to change on button click would go here
Casey Brooks
10/26/2023, 9:30 PMAlex Goldman
10/27/2023, 7:28 PMCasey Brooks
10/27/2023, 7:29 PMAlex Goldman
10/27/2023, 7:39 PMTagRow(
tag = tagState,
updateTag = {
newTag -> tagState = newTag
Log.d("DEBUG", "Updating tag to: $newTag")
},
feedPath = feedPathState,
updateFeedPath = { newPath ->
feedPathState = newPath
Log.d("DEBUG", "Updating feed to: $newPath")
},
listItems = listItems,
updateOldFeedData = { data ->
oldFeedData = data
Log.d("DEBUG", "Updating data to: $data")
}
var oldFeedData by remember { mutableStateOf<FeedData?>(null) }