✅ Have the list updated after the state changes
Ok, the problem now is how to update the entries list dynamically after the application store changes.
If I have lists nested into another list, and I change the top-most list, although the changes are eventually propagated after I reload the view, it doesn’t happen magically when I save changes.
Hours after digging this problem, I couldn’t find an elegant way to make the views update accordingly. I think I need to use an environment object to do that.
Using an environment object does solve the problem of having the data binding working as expected, but it causes the chicken-egg problem:
NavigationLink needs to be created with every item in the list and I cannot select the view model prior to push the view to the hierarchy. But I can only change the selected view model once the view is in the hierarchy.
I am very interesting to see how the community has been solving this type of problem. I will create a PoC to see if in a cleaner structure (without all the boilerplate code I’ve already written) the binding would work as expected.
Yearvu source code can be found in my GitHub.