Skip to content

Conversation

ynechaev
Copy link

This PR introduces separate internal interfaces for live and preview model container and context. This separation is being incapsulated behind built-in TCA's feature: live and preview implementations.

Here is a list of changes:

  • Add container API to the Database
  • Remove throwing from add and delete MovieDatabase functions due to redundancy.
  • Fix ContentView preview and functionality by removing no-op handler from preview operator and supplying modelContainer prior to view rendering.

From now on you can use container function if you need to supply it to a SwiftUI view with .modelContainer(_:) modifier.

context() function remains accessible for backwards compatibility.

@ynechaev
Copy link
Author

ynechaev commented Apr 7, 2024

@SouzaRodrigo61 any comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant