PSA: if you're having issues with the #WWDC2023 "Build an app with #SwiftData" session similar to:
CompileDylibError: Failed to build ContentView.swift
Compiling failed: main actor-isolated let 'previewContainer' can not be referenced from a non-isolated context
Replacing the `#Preview` macro with the old-style preview syntax resolves the issue. (I don't have macOS 14 so I'm running the preview on iOS and it looks weird with the frame so I removed it. Added a frame version if you want it.)