github elementary-swift/elementary-ui 0.9.0

3 hours ago

🔑 ForEach, now with id: 🔑

ForEach can now be keyed by any Hashable id, or use Identifiable elements directly.

struct Todo: Identifiable {
    let id: UUID
    var title: String
}

ForEach(todos) { todo in
    li { todo.title }
}

ForEach(names, id: { $0 }) { name in
    li { name }
}

⚠️ When upgrading:

  • key: and .key() are deprecated in favor of id: and .id()
  • ForEach now requires a RandomAccessCollection, and is no longer Sendable
  • The minimum macOS version is now 26

🖥️ Server rendering 🖥️

ElementaryUI views now have basic support for SSR/SSG: they can be rendered to HTML using .render().

⚡ Performance ⚡

List updates, reactive state changes and attribute patching are all faster, with fewer allocations.

What's Changed

Full Changelog: 0.8.1...0.9.0

Don't miss a new elementary-ui release

NewReleases is sending notifications on new releases.