Skip to content

Question re observing flagPole in SwiftUI in v3 #146

@ryanbooker

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?

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