Skip to content
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

handle lifecycle in JS targets #381

Merged
merged 1 commit into from
Sep 20, 2024
Merged

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
2 checks passed
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