-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh live compose scan by observing RecomposerInfo instead of only the top-most recompose scope. #135
base: main
Are you sure you want to change the base?
Conversation
… the top-most recompose scope.
Is there a "I have no idea what YOU're doing" dog meme? |
viewFilter = skipComposeTestTagsFilter(LIVE_HIERARCHY_TEST_TAG) | ||
) | ||
LaunchedEffect(Unit) { | ||
runLiveScanning { liveHierarchy.value = it } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool so this effectively says "rescan every time we've recomposed". btw does that not retrigger a composition / any risk of infinite loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. It does not trigger infinite composition loop, although I'm not super clear on why not. I can look into it and document, because it does seem like that should happen.
- Figure out why no infinite loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I get why there's no infinite loop now. Because we exclude the scan result composable from the scan, a scan in which only the scan output changes will result in the scan string being set to the same value, which won't invalidate any recompose scopes.
I'll add a comment about this and punch up the docs on the Recomposers stuff.
This makes use of the new Flow-based APIs for observing Recomposer state.