Hi, I noticed that, when using `ComposeView` in a ...
# compose
y
Hi, I noticed that, when using
ComposeView
in a fragment and when navigating back, the fragment doesn't get automatically destroyed! I needed to destroy it myself as:
Copy code
BackHandler {
    findNavController().navigateUp()
    onDestroyView()
    onDestroy()
}
PS: I'm using the composition strategy as:
Copy code
override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View = ComposeView(requireContext()).apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
            setContent {}
        }
am I missing something?