-
Notifications
You must be signed in to change notification settings - Fork 82
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
CircuitX - ImpressionEffect #1008
Conversation
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.
The tests are excellent! I do have a concern about them though - currently we don't run instrumentation tests on CI (we moved everything to robolectric). Is it possible to do that here? Relatedly, is it possible to test (a subset) of the impl in common tests for more multiplatform coverage?
Some other thoughts
- are we married to "sideffects" or should we just call it "effects"?
- I'm somewhat of the mind that we should actually make this a core circuit library, I think this pretty quickly becomes required for any app using Circuit
- Do you think we should account for
LocalPinnedContainer
(per our offline discussions wrt event listeners) here?
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.
chefskiss.png
Turns out, we can! Interesting use of molecule and some expect/actual to get it all working though. Did that with c04d79f.
Nope
I think for the basic circuit use it's fine to not have it in foundation, and have it as an extension for advanced use. Don't really mind either way though 🤷🏻
Uses of this should be very deliberate so I don't think we need to do any extra support for sub-circuit use with this. |
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.
🚀
Approving but could you add small doc to circuitx docs for the site before you merge?
Changes
ImpressionEffect
: A side effect that will run animpression
once based on the retain strategyLaunchedImpressionEffect
: A [LaunchedEffect] that will run a suspendableimpression
once, based on the retain strategyrememberImpressionNavigator
: A [LaunchedImpressionEffect] that will also re-run theimpression
if it re-enters the composition after a navigation event.