I have an onAppear statement which is working fine when the view first loads:
.onAppear(){
getData(from: "https://api.data/address/\(dataSettings.dataname)/storage/\(dataSettings.storagename)") { result in
self.content = result
}
}
However, when the user navigates away to a settings page and changes some information, this onAppear (correctly) does not update again. Is there something I can replace this with to cause the content to update if the settings information is updated?
.task(id: dataSettings)
will happen on appear and when settings change