<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: The three types of actions in NgRx	</title>
	<atom:link href="https://christianlydemann.com/the-three-types-of-actions-in-ngrx/feed/" rel="self" type="application/rss+xml" />
	<link>https://christianlydemann.com/the-three-types-of-actions-in-ngrx/</link>
	<description>Advanced Angular Training Made Simple</description>
	<lastBuildDate>Thu, 25 Jun 2020 14:02:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.4</generator>
	<item>
		<title>
		By: Li7ardKing		</title>
		<link>https://christianlydemann.com/the-three-types-of-actions-in-ngrx/#comment-53227</link>

		<dc:creator><![CDATA[Li7ardKing]]></dc:creator>
		<pubDate>Thu, 25 Jun 2020 14:02:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=19023#comment-53227</guid>

					<description><![CDATA[Hi Christian, great post.  Thanks for writing it.  I am new to these concepts and am trying to understand your ideas in my own terms and am getting a bit lost.  I have questions about each Action type you describe - Events, Document Messages, and Commands.  Any further explanation would be terrific!  Thank you in advance.

&lt;b&gt;Events&lt;/b&gt;
Why are events described like this...  &quot;[Save Button] clicked]&quot;...  and not more like what you see in something like .NET.

For example, for &quot;[Save Button] clicked]&quot; you might have a generic &lt;b&gt;Clicked Event&lt;/b&gt;, implemented by an object &lt;b&gt;Button&lt;/b&gt;, that addresses the use case &lt;b&gt;Save&lt;/b&gt;.

So instead of &quot;[Save Button] clicked&quot;, something like 
&lt;code&gt;&quot;[click] {
&quot;target&quot;: {
id: &quot;#saveButton&quot;,
label: &quot;Save&quot;
},
payload:{
...entity-goes-here
}&quot;&lt;/code&gt;

I like this because it means the events themselves can be well-defined and you can create interfaces around them.  But in all the examples I see, and in this post, I never see anyone say/do this.  So I think I may not yet see why this is not done here.  Maybe it&#039;s overkill?

&lt;b&gt;Document Messages&lt;/b&gt;
I don&#039;t think I understand what these really are.  I read this as something an entity does once it&#039;s been updated.  In your example, I think this happens whenever there is a change to the ToDoList entity.  

If this is correct, I am not sure why this is necessary because aren&#039;t all objects interested in the the State of ToDoList already subscribed to it?  What is listening for the Update Document Message that isn&#039;t already somehow subscribed to the ToDoList data itself?

&lt;b&gt;Commands&lt;/b&gt;
I use a Command to load a config file as part of my ngrx store implementation.  In the Effect, it either dispatches a Success or Failure event.  Is this the scenario you describe as being an example of what causes you to lose reactive control flow?  What would you recommend instead?

Also at first, I thought I might want to simply use this Command to indicate that the state of the sender was READY to receive data (as opposed to explicitly naming &quot;LoadConfig&quot; (&#060;- this could change).  So instead of &#034;[Application] LoadConfig&#034; something like &#034;[Application] Ready&#034;.  Like I said above, this could be typed and assumptions could be made about what Ready means in a given context, but the sender doesn&#039;t have to care.

--

Thank you for any additional explanations.]]></description>
			<content:encoded><![CDATA[<p>Hi Christian, great post.  Thanks for writing it.  I am new to these concepts and am trying to understand your ideas in my own terms and am getting a bit lost.  I have questions about each Action type you describe &#8211; Events, Document Messages, and Commands.  Any further explanation would be terrific!  Thank you in advance.</p>
<p><b>Events</b><br />
Why are events described like this&#8230;  &#8220;[Save Button] clicked]&#8221;&#8230;  and not more like what you see in something like .NET.</p>
<p>For example, for &#8220;[Save Button] clicked]&#8221; you might have a generic <b>Clicked Event</b>, implemented by an object <b>Button</b>, that addresses the use case <b>Save</b>.</p>
<p>So instead of &#8220;[Save Button] clicked&#8221;, something like<br />
<code>"[click] {<br />
"target": {<br />
id: "#saveButton",<br />
label: "Save"<br />
},<br />
payload:{<br />
...entity-goes-here<br />
}"</code></p>
<p>I like this because it means the events themselves can be well-defined and you can create interfaces around them.  But in all the examples I see, and in this post, I never see anyone say/do this.  So I think I may not yet see why this is not done here.  Maybe it&#8217;s overkill?</p>
<p><b>Document Messages</b><br />
I don&#8217;t think I understand what these really are.  I read this as something an entity does once it&#8217;s been updated.  In your example, I think this happens whenever there is a change to the ToDoList entity.  </p>
<p>If this is correct, I am not sure why this is necessary because aren&#8217;t all objects interested in the the State of ToDoList already subscribed to it?  What is listening for the Update Document Message that isn&#8217;t already somehow subscribed to the ToDoList data itself?</p>
<p><b>Commands</b><br />
I use a Command to load a config file as part of my ngrx store implementation.  In the Effect, it either dispatches a Success or Failure event.  Is this the scenario you describe as being an example of what causes you to lose reactive control flow?  What would you recommend instead?</p>
<p>Also at first, I thought I might want to simply use this Command to indicate that the state of the sender was READY to receive data (as opposed to explicitly naming &#8220;LoadConfig&#8221; (&lt;- this could change).  So instead of &quot;[Application] LoadConfig&quot; something like &quot;[Application] Ready&quot;.  Like I said above, this could be typed and assumptions could be made about what Ready means in a given context, but the sender doesn&#039;t have to care.</p>
<p>&#8212;</p>
<p>Thank you for any additional explanations.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 0/1321 objects using Memcache
Page Caching using Disk: Enhanced 
Minified using Disk
Database Caching using Disk (Request-wide modification query)

Served from: christianlydemann.com @ 2026-02-26 21:00:45 by W3 Total Cache
-->