Skip to content

0.9.0

Latest

Choose a tag to compare

@sliemeobn sliemeobn released this 30 Oct 18:45
6e81fe0

๐Ÿ”‘ 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