The _observeTextReference modifier tracks changed to the element associated with a TextReference type. In the content block, modifiers that use the referenced Text element can be applied. They will now properly update their contents in response to changes from the server.
In this example, the navigationTitle and badge modifiers use TextReference types, and update when the count changes.
Closes #1380
The
_observeTextReference
modifier tracks changed to the element associated with aTextReference
type. In thecontent
block, modifiers that use the referencedText
element can be applied. They will now properly update their contents in response to changes from the server.In this example, the
navigationTitle
andbadge
modifiers useTextReference
types, and update when thecount
changes.https://github.com/liveview-native/liveview-client-swiftui/assets/13581484/73c87981-7507-42a7-921c-dfccf44e8054