title: Jetpack compose: Rendering the vector asset based on the boolean value
body: <p>I've been playing with Jetpack Compose, and trying out few things. One of those is rendering the vector assets (svgs).</p>
  
  <p>I have created a custom checkbox component. Here's the code:</p>
  
  <pre><code>@Composable
  fun CustomCheckBox(
      checked: Boolean = false,
      onClick: (() -&gt; Unit)?,
      children: (@Composable() () -&gt; Unit)? = null
  ) {
      val imgRes = if (checked) R.drawable.ic_checkbox_on else R.drawable.ic_checkbox_off
      val vectorAsset = +vectorResource(imgRes)
  
      Clickable(onClick = onClick) {
          Row(modifier = Height(100.dp) wraps Expanded) {
              Container(
                  width = vectorAsset.defaultWidth.value.dp,
                  height = vectorAsset.defaultHeight.value.dp
              ) {
                  DrawVector(vectorImage = vectorAsset)
              }
              Container(modifier = Spacing(top = 10.dp)) {
                  children?.invoke()
              }
          }
      }
  }
  </code></pre>
  
  <p>And here's some more code so that we have a full picture:</p>
  
  <pre><code>@Composable
  fun TermsConditions(state: TermsAndConditionsState) {
      CustomCheckBox(
          onClick = {
              state.accepted = !state.accepted
          },
          checked = state.accepted,
          children = {
              Text(text = "I accept the Terms of Service\" or \"I accept the Privacy Statement\" \"Click here to indicate that you have read and agree to the terms presented in the Terms and Conditions agreement.")
          }
      )
  }
  </code></pre>
  
  <p>My model class:</p>
  
  <pre><code>@Model
  data class TermsAndConditionsState(var accepted: Boolean)
  </code></pre>
  
  <p>I'm having an issue thou: whenever I click on the checkbox component, the state change gets triggered (the <code>accept</code> flag is inverted). However, it's not reflected in the UI. Surprisingly, it works with PNGs.</p>
  
  <p>Does anybody know what I might be doing wrong? Or is it just a bug in Compose? I know it's in very early dev stage, so the wrong behavior can be expected. </p>