-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Description
Reported by @saroar in a comment to another issue.
Steps to reproduce
- Add
onAppearactions to each component. - Send the
onAppearaction to theViewStoreinside.onAppear(perform:)modifier in each view. - In each of the reducers, just return
.noneeffect whenonAppearaction is received. - Run the app and randomly switch tabs.
Expected behavior
- Whenever tab is switched,
onAppearaction of the currently selected tab's component should be received.
Actual behavior
- Sometimes wrong
onAppearaction is received, for example when switching from "Color" to "Shape" tab, instead of singleShapeAction.onAppear, two actions are received:ShapeAction.onAppearand thenPreviewAction.onAppear.
Testing notes
The issue occurs only when action is sent to the ViewStore in .onAppear(perform:) modifier. When not sending the action in the closure (but for example just printing something to the console) - everything is working as expected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed