Skip to content

Repeats on each recomposition #27

@MHKalantarian

Description

@MHKalantarian

It repeats showing Showcase on each recomposition even though the view that has its modifier does not get recomposed
It also triggers twice anytime you enter a screen with compose navigation and without any recomposition


@Composable
internal fun ProfileScreen(
    modifier: Modifier = Modifier
) {
    var showAppIntro by remember {
        mutableStateOf(true)
    }

    IntroShowcase(
        showIntroShowCase = showAppIntro,
        onShowCaseCompleted = { showAppIntro = false },
        dismissOnClickOutside = true,
    ) {
        Scaffold(
            modifier = modifier,
            containerColor = MaterialTheme.colorScheme.tertiary,
            contentColor = MaterialTheme.colorScheme.onTertiary
        ) { insets ->
            Text(
                modifier = Modifier
                    .padding(insets)
                    .introShowCaseTarget(
                        index = 0,
                        content = {
                            Text(text = "test")
                        }
                    ),
                text = "Target view"
            )
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions