title: set @State var inside geometryReader
body: <p>How is it possible to set a @State var inside a geometryReader?</p>
  <p>This is my code:</p>
  <pre class="lang-swift prettyprint-override"><code>@State var isTest:Int = 0
  
  var body: some View {
      VStack{
          ForEach(self.test, id: \.id) { Test in
              VStack{
                  GeometryReader { geometry in
                      self.isTest = 1
  </code></pre>
  <p>I try with a function but it doesn't work.</p>
  <pre><code>@State var isTest: Int = 0
  
  func testValue() {
      self.isTest = 1
  }
  
  var body: some View {
      VStack{
          ForEach(self.test, id: \.id) { Test in
              VStack{
                  GeometryReader { geometry in
                      testValue()
  
  </code></pre>
  <p>Any idea? Thanks!</p>