Skip to content

Conversation

@kkalisz
Copy link
Contributor

@kkalisz kkalisz commented Sep 19, 2024

Hi I have found exact the same issue as in #98 but for JS targets.

Lifecycle for JS targets is not initialised with Active state so collect is not not grabbing any events.
I have found this issue when working on JS support for typesfe navigation

Lavmee/precompose-navigation-typesafe#36

val navigator = rememberNavigator()
val currentEntry by navigator.currentEntry.collectAsStateWithLifecycle(null)

This PR fixes the issue and moves lifecycle to active state after creation of PreComposeWindowHolder

before

Screen.Recording.2024-09-19.at.22.20.02.mov

after

Screen.Recording.2024-09-19.at.22.03.37.mov

Copy link
Owner

@Tlaster Tlaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@Tlaster Tlaster merged commit 26b46ac into Tlaster:master Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants