Skip to content

Question re observing flagPole in SwiftUI in v3 #146

Description

@ryanbooker

This is really just a question:

Am I right in thinking you can't just use the flagPole as if it were an observable, but rather have to observe the stream/publisher and then set some observable state to trigger view updates?

e.g. Text(flagPole.foo) is not dynamic it is just static data from when the screen reloaded. To update when it changes you need to onReceive(flagPole.$foo) or flagPole.$foo.sink or for await foo in flagPole.$foo and set an @State or whatever observable object you have?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions