title: Jetpack Compose - How can we call a @Composable function inside an onClick()
body: <p>I know its not possible to call composable functions inside onClick.
  @Composable invocations can only happen from the context of a @Composable function</p>
  <p>Compose version - alpha06</p>
  <p>But I'm stuck with the below requirement.
  The requirement is,
  Call a server api call inside an onClick.</p>
  <pre><code>LazyColumnFor(items = list) { reports -&gt;
      Box(Modifier.clickable(
          onClick = {
              //API call
              val liveDataReportsDetails =
                  viewModel.getReportDetails(&quot;xxxx&quot;)
              LiveDataComponentForReportsDetails(liveDataReportsDetails)
  
  
          }
      )) {
  
          ReportListItem(
              item = reports
          )
      }
  }
  </code></pre>