title: SWIFTUI Call Key Dictionary not work with the error: 'Subscript index of type '() -> Bool' in a key path must be Hashable'
body: <p>I have this view:</p>
  
  <pre><code>import SwiftUI
  
  struct SectionView1: View {
  
      let dateStr:String    
      @Binding var isSectionView:Bool
  
      var body: some View {
          HStack {
              Button(action: {
                  self.isSectionView.toggle()
              }) {
                  Image(systemName: isSectionView ? "chevron.down.circle" : "chevron.right.circle")
              }
              Text("Media del \(dateStr)")
          }
      }
  }
  </code></pre>
  
  <p>which will be called from view:</p>
  
  <pre><code>import SwiftUI
  import Photos
  
  struct MediaView: View {
      let geoFolder:GeoFolderCD
  
      @State private var assetsForDate = [String :[PHAsset]]()
      @State private var isSectionViewArray:[String:Bool] = [:]
  
      var body: some View {
          List {
              ForEach(assetsForDate.keys.sorted(by: &gt; ), id: \.self) { dateStr in
                  Section {
                      SectionView1(dateStr: dateStr,
                                   isSectionView: self.$isSectionViewArray[dateStr, default: true])
                  }
              }
          }
          .onAppear {
              self.assetsForDate = FetchMediaUtility().fetchGeoFolderAssetsForDate(geoFolder: geoFolderStruct, numAssets: numMediaToFetch)
              for dateStr in self.assetsForDate.keys.sorted() {
                  self.isSectionViewArray[dateStr] = true
              }
          }
      }
  }    
  </code></pre>
  
  <p>but I have the error: <code>Subscript index of type '() -&gt; Bool' in a key path must be Hashable</code> in <code>isSectionView: self.$isSectionViewArray[dateStr, default: true]</code></p>
  
  <p>Why <code>isSectionViewArray:[String:Bool] = [:]</code> is not Hasbable?</p>
  
  <p>How can modify the code for work?</p>
  
  <p>If I remove, in <code>SectionView</code>, <code>@Binding var isSectionView:Bool</code>, the code work fine, or if I set, from <code>SectionView</code>, <code>@Binding var isSectionViewArray:[String:Bool] = [:]</code>, the code work fine.</p>