Closed josephktcheung closed 2 years ago
Thanks for raising this issue @josephktcheung. I think the issue was due to using potentially stale data to build the view. I've done a quick fix but I think it will need to be finessed to cover IdentifiedRouter
setups too.
This should now be resolved in v0.1.2. Thanks a lot for your input.
Hi,
We recently faced a weird issue using TCARouter with SwiftUI view that wraps a UIKit view. Somehow it stops working when we include the view as a screen inside TCARouter (new value sent by viewStore.publisher doesn't reflect on UI).
Here's a modified example app of TCACoordinators project:
TCACoorindatorExampleApp.swift
GameCoordinator.swift
GameView.swift (copied from https://github.com/pointfreeco/swift-composable-architecture/blob/main/Examples/TicTacToe/tic-tac-toe/Sources/GameUIKit/GameViewController.swift, https://github.com/pointfreeco/swift-composable-architecture/blob/main/Examples/TicTacToe/tic-tac-toe/Sources/GameCore/GameCore.swift and https://github.com/pointfreeco/swift-composable-architecture/blob/main/Examples/TicTacToe/tic-tac-toe/Sources/GameCore/Three.swift)
And here's a video recording showing that
GameCoordinatorView
doesn't work but ordinaryGameView
works:https://user-images.githubusercontent.com/4270232/166885482-920eae2e-5990-40a6-a7ce-99a9d90127ca.mp4
We don't have any clue on how TCACoordinators interferes with viewStore's publisher, would like to get some help here!
Thanks. Joseph