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)
Making side effects directly from
@Composable
functions is incorrect, the function may be executed multiple times in a row, and so you willpop
multiple times as well. You should produce side effects from things likeLaunchedEffect
,DisposableEffect
, click actions, etc.Rookie Mistake I guess, Sorry for all the inconvenience. Closing it now