<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="symbol monospace"><spanclass="token keyword">fun </span><spanclass="token operator"><</span><ahref="as-compose-state.html">T</a><spanclass="token operator">></span><spandata-unresolved-link="kotlinx.coroutines.flow/Flow///PointingToDeclaration/">Flow</span><spanclass="token operator"><</span><ahref="as-compose-state.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="as-compose-state.html"><spanclass="token function">asComposeState</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">initial<spanclass="token operator">: </span><ahref="as-compose-state.html">T</a><spanclass="token punctuation">, </span></span><spanclass="parameter ">scope<spanclass="token operator">: </span><spandata-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><spanclass="token punctuation">, </span></span><spanclass="parameter ">useContextOnChange<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-coroutine-context/index.html">CoroutineContext</a><spanclass="token operator">?</span><spanclass="token operator"> = </span>Dispatchers.Main<spanclass="token punctuation">, </span></span><spanclass="parameter ">onException<spanclass="token operator">: </span><ahref="../dev.inmo.micro_utils.coroutines/-exception-handler/index.html">ExceptionHandler</a><spanclass="token operator"><</span><ahref="as-compose-state.html">T</a><spanclass="token operator">?</span><spanclass="token operator">></span><spanclass="token operator"> = </span>defaultSafelyWithoutExceptionHandlerWithNull</span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><spandata-unresolved-link="/&lt;Error class: unknown class&gt;///PointingToDeclaration/"><Error class: unknown class></span><spanclass="token operator"><</span><ahref="as-compose-state.html">T</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/InsanusMokrassar/MicroUtils/blob/master//coroutines/compose/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/compose/FlowAsState.kt#L70">source</a>)</span></span></div><pclass="paragraph">Will create MutableState using <ahref="as-mutable-compose-state.html">asMutableComposeState</a> and use <ahref="../dev.inmo.micro_utils.common.compose/as-state.html">asState</a> to convert it as immutable state</p><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain"data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>initial</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">First value which will be passed to the result State</p></div></div></div></div><divclass="table-row"data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain"data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>scope</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">Will be used to <ahref="../dev.inmo.micro_utils.coroutines/subscribe-safely-without-exceptions.html">subscribeSafelyWithoutExceptions</a> on <spandata-unresolved-link="dev.inmo.micro_utils.coroutines.compose//&lt;this&gt;/#/PointingToCallableParameters(-1)/">this</span> to update returned State</p></div></div></div></div><divclass="table-row"data-filterable-current=":micro_utils.dokka:dokkaHtml/commonMain"data-filterable-set=":micro_utils.dokka:dokkaHtml/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass