For anyone having the same issue, I managed to fix it: rather than declaring the object as an observable, I declared it as an @StateObject which worked.
Topic:
Programming Languages
SubTopic:
Swift
Tags: