<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Flow on Chanzmao ʕ•ᴥ•ʔ Bear Blog</title>
		<link>https://chanzmao.benigumo.com/blog/flow/</link>
		<description>Recent content in Flow on Chanzmao ʕ•ᴥ•ʔ Bear Blog</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
			<copyright>(c) 2026 chanzmao</copyright>
		
		
			<lastBuildDate>Mon, 15 Jun 2026 04:21:15 +0900</lastBuildDate>
		
			<atom:link href="https://chanzmao.benigumo.com/blog/flow/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>When Should You Use snapshotFlow in Jetpack Compose?</title>
				<link>https://chanzmao.benigumo.com/when-should-you-use-snapshotflow-in-jetpack-compose/</link>
				<pubDate>Mon, 15 Jun 2026 04:21:15 +0900</pubDate>
				<guid>https://chanzmao.benigumo.com/when-should-you-use-snapshotflow-in-jetpack-compose/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://chanzmao.benigumo.com/images/2026-06-15-snapshotflow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Jetpack Compose provides several ways to react to state changes. Among them, &lt;code&gt;snapshotFlow&lt;/code&gt; is often misunderstood.&lt;/p&gt;&#xA;&lt;p&gt;Many developers either overuse it or never use it at all.&lt;/p&gt;&#xA;&lt;p&gt;The key idea is simple:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Use &lt;code&gt;snapshotFlow&lt;/code&gt; when you need to convert Compose state into a Kotlin Flow and perform side effects.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re only updating the UI, &lt;code&gt;snapshotFlow&lt;/code&gt; is usually the wrong tool.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-snapshotflow-actually-does&#34;&gt;What snapshotFlow Actually Does&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;snapshotFlow&lt;/code&gt; observes Compose state and emits new values as a Flow whenever that state changes.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
