Riley Moses
Riley Moses
Crafty! I'd totally forgotten about using Java to get around Kotlin's `internal` - that does appear to work as well 👍
I have run into another issue, although I think it's a bug with Compose instead of RN: I'm using `react-navigation` to progress through screens `A` -> `B` -> `C`, pushing...
I'm not 100% confident in my explanation; it seems like it'd be an obvious issue in any app using Compose with multiple fragments 🤔
I did not determine why the `AndroidComposeView` is staying around - AFAICT the only thing holding on to it is the `AbstractComposeView` itself, which [adds it to itself in `setContent()`](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/Wrapper.android.kt;l=80)....
I'm not sure if it's helpful, but this was my debugger output: `A` -> `B` ``` MyView@124075016 onAttachedToWindow MyView@124075016 create composition MyView@124075016 setContent addView AndroidComposeView@144268683 to MyView@124075016 AndroidComposeView@144268683 doSetContent setContent:...
And FWIW this is using [react-native-screens](https://github.com/software-mansion/react-native-screens) in conjunction with [react-navigation](https://github.com/react-navigation/react-navigation) Edit: Just a guess, but perhaps related to https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119 > we cannot destroy and then make new views by restoring...
Had a bit of time to mess with this some more; unsurprisingly, that bug did not magically fix itself while I was away 😅 I've pushed a minimum reproducible example...
 It appears the lifecycle/composition workarounds discussed earlier in this thread are no longer necessary as of: * RN 0.68 * Compose compiler 1.3.0-rc01 * Compose artifacts 1.2.0 * Appcompat...
Hopefully we get this as an official option, but in the meantime the [Containerise](https://addons.mozilla.org/en-US/firefox/addon/containerise/) addon allows assigning domains to "no container"
@hurali97 Interesting! It seems a bit heavy-handed to host an entire Fragment just to show the composable, but good to know there's a workaround 🤔