Decompose: Router.pop throwing Exception

When I call router.pop within a few milliseconds of pushing a child, An exception is thrown with the following Message: "Configuration stack can not be empty"

Am I doing something wrong, but if I call router.pop say after a delay of 200ms, it works as expected

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

But if you disable the delay and bring model.errorOccured?.let{/******/} out of lauched Effect

Making side effects directly from @Composable functions is incorrect, the function may be executed multiple times in a row, and so you will pop multiple times as well. You should produce side effects from things like LaunchedEffect, DisposableEffect, click actions, etc.

Rookie Mistake I guess, Sorry for all the inconvenience. Closing it now