mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-24 12:14:25 +01:00
Runtime warn when stack integration is missing from store's reducer (#3048)
* Runtime warn when reducer is missing stack integration If SwiftUI writes to a binding and the state is invalid (it is not inserting or removing elements from the stack), then the most likely cause is a missing `forEach` in the reducer (or a missing integration in some parent reducer). This commit adds a runtime warning to detect this issue. * wip
This commit is contained in:
@@ -785,7 +785,7 @@ extension WithViewStore where ViewState: Equatable, Content: View {
|
||||
customDump(self.value, to: &value, maxDepth: 0)
|
||||
runtimeWarn(
|
||||
"""
|
||||
A binding action sent from a view store \
|
||||
A binding action sent from a store \
|
||||
\(self.context == .bindingState ? "for binding state defined " : "")at \
|
||||
"\(self.fileID):\(self.line)" was not handled. …
|
||||
|
||||
|
||||
Reference in New Issue
Block a user