-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust for ObservableObject
being in Combine
, and willChange
instead of didChange
#47
Comments
I don't think |
It should work, here is the sample I was testing with: https://github.com/SwiftWebUI/Tinker2/blob/master/Sources/Tinker2/Views/Tests/BindingTestView.swift |
What is this for? Should I add OpenCombine to the project? I think it is not working due to the fact the Two types |
I've copy example from here example That's what I am getting. Without SwiftWebUI.Obse.... I have error such as:
|
All this is completely unrelated to this issue. OpenCombine is required on Linux, on macOS you can use the regular Combine (but you need Catalina). |
What I meant is that I still can't get it to work. Due to errors presented above. |
Oh, sorry. Actually it may not work indeed 🤔 That's what the issue is about 😄
I'm not sure how much, maybe it isn't actually that bad. Just replacing didChange w/ willChange might work, because WebUI is still working in a transaction. The "will" will still mark the view as dirty and should trigger the diffing. |
Resolved compiling issue. By placing ObservableObject in separate file with one import of SwiftWebUI. |
This might require a little rework.
Combine also has the
@Published
, though SwiftUI still has the@ObservedObject
.The text was updated successfully, but these errors were encountered: