<?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: Refactoring Angular Apps to Reactive Architecture	</title>
	<atom:link href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/</link>
	<description>Advanced Angular Training Made Simple</description>
	<lastBuildDate>Thu, 06 Feb 2020 16:32: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: Louis		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-33231</link>

		<dc:creator><![CDATA[Louis]]></dc:creator>
		<pubDate>Thu, 06 Feb 2020 16:32:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-33231</guid>

					<description><![CDATA[Hi Christian, thanks for the article, very helpful. I&#039;ve a question..

Sometimes is needed to access to a value from an observable, let&#039;s say I have a selector

&lt;code&gt;public getUser$: Observable = this.store.select(state =&#062; state.user) &lt;/code&gt;

And I need the value that comes from that observable to validate some variables into my .ts controller, it is posible to AVOID in the .ts subscribing to that observable to get the value?, because is a value that I&#039;ll not use in the template (so i can not use async pipe),

&lt;code&gt;
  private user: User = {} as User;
  (...)
  private anyName(): void {
         this.facade.getUser$.subscribe((user: User) =&#062; {
         this.user = user;
    })
  }
&lt;/code&gt;

Doing the code above is bad? in the case that I need the information from the observable to be handled and used in the .ts, not in the template. 

I got a little bit confused

Thanks!]]></description>
			<content:encoded><![CDATA[<p>Hi Christian, thanks for the article, very helpful. I&#8217;ve a question..</p>
<p>Sometimes is needed to access to a value from an observable, let&#8217;s say I have a selector</p>
<p><code>public getUser$: Observable = this.store.select(state =&gt; state.user) </code></p>
<p>And I need the value that comes from that observable to validate some variables into my .ts controller, it is posible to AVOID in the .ts subscribing to that observable to get the value?, because is a value that I&#8217;ll not use in the template (so i can not use async pipe),</p>
<p><code><br />
  private user: User = {} as User;<br />
  (...)<br />
  private anyName(): void {<br />
         this.facade.getUser$.subscribe((user: User) =&gt; {<br />
         this.user = user;<br />
    })<br />
  }<br />
</code></p>
<p>Doing the code above is bad? in the case that I need the information from the observable to be handled and used in the .ts, not in the template. </p>
<p>I got a little bit confused</p>
<p>Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kevin Wilson		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-29867</link>

		<dc:creator><![CDATA[Kevin Wilson]]></dc:creator>
		<pubDate>Tue, 14 Jan 2020 04:23:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-29867</guid>

					<description><![CDATA[&lt;a href=&quot;https://www.zhiznii.ru&quot; rel=&quot;nofollow ugc&quot;&gt;A Life&lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.zhiznii.ru" rel="nofollow ugc">A Life</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chandler Fang		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27766</link>

		<dc:creator><![CDATA[Chandler Fang]]></dc:creator>
		<pubDate>Mon, 30 Dec 2019 11:40:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27766</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27636&quot;&gt;Christian Lydemann&lt;/a&gt;.

Sure.

Lets say
1. a component with 6,7 buttons.
2. each of these buttons will trigger different http verbs (http put, post or delete) to maybe different url.
3. all the differernt request of these http calls all need to be composed with maybe the response of one single http.get call.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27636">Christian Lydemann</a>.</p>
<p>Sure.</p>
<p>Lets say<br />
1. a component with 6,7 buttons.<br />
2. each of these buttons will trigger different http verbs (http put, post or delete) to maybe different url.<br />
3. all the differernt request of these http calls all need to be composed with maybe the response of one single http.get call.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: hgoebl		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27753</link>

		<dc:creator><![CDATA[hgoebl]]></dc:creator>
		<pubDate>Mon, 30 Dec 2019 09:42:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27753</guid>

					<description><![CDATA[Thank you - a great post!
I think there is a bug in one of the source code snippets.
After the headline &quot;As parameters to function/HTTP calls&quot;, a `return` is missing before `this.todoListResourcesService.getTodos()`.]]></description>
			<content:encoded><![CDATA[<p>Thank you &#8211; a great post!<br />
I think there is a bug in one of the source code snippets.<br />
After the headline &#8220;As parameters to function/HTTP calls&#8221;, a `return` is missing before `this.todoListResourcesService.getTodos()`.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: M.S. vignesh		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27644</link>

		<dc:creator><![CDATA[M.S. vignesh]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 14:59:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27644</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27577&quot;&gt;Chandler Fang&lt;/a&gt;.

Thank you.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27577">Chandler Fang</a>.</p>
<p>Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Lydemann		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27637</link>

		<dc:creator><![CDATA[Christian Lydemann]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 13:44:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27637</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27360&quot;&gt;M.S. vignesh&lt;/a&gt;.

Thanks!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27360">M.S. vignesh</a>.</p>
<p>Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Lydemann		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27636</link>

		<dc:creator><![CDATA[Christian Lydemann]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 13:43:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27636</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27397&quot;&gt;Chandler Fang&lt;/a&gt;.

That is why I wrote the second scenario: 
As parameters to function/HTTP calls

And how you should handle that :)

I still don&#039;t recommend you to use state properties as you are loosing the powers of the reactive architecture as stated in the article. Do you have a good example where this would make sense?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27397">Chandler Fang</a>.</p>
<p>That is why I wrote the second scenario:<br />
As parameters to function/HTTP calls</p>
<p>And how you should handle that 🙂</p>
<p>I still don&#8217;t recommend you to use state properties as you are loosing the powers of the reactive architecture as stated in the article. Do you have a good example where this would make sense?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Lydemann		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27635</link>

		<dc:creator><![CDATA[Christian Lydemann]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 13:39:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27635</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27576&quot;&gt;Chandler Fang&lt;/a&gt;.

That is why I stated there are exceptions but subscribing in the template using async pipe is the general best practice for reactive Angular apps as it is the least boilerplate and it will automatically unsubscribe eg. selectors.
Of course there are exceptions as I wrote:
&quot;
We want to avoid manually calling subscribe as much as possible but there are still cases, where it makes sense to manually subscribe. Common scenarios are subscribing to a FormControl’s valueChanges or router events. But in all other cases, we want to just follow the two cases above.
&quot;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27576">Chandler Fang</a>.</p>
<p>That is why I stated there are exceptions but subscribing in the template using async pipe is the general best practice for reactive Angular apps as it is the least boilerplate and it will automatically unsubscribe eg. selectors.<br />
Of course there are exceptions as I wrote:<br />
&#8221;<br />
We want to avoid manually calling subscribe as much as possible but there are still cases, where it makes sense to manually subscribe. Common scenarios are subscribing to a FormControl’s valueChanges or router events. But in all other cases, we want to just follow the two cases above.<br />
&#8220;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Lydemann		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27628</link>

		<dc:creator><![CDATA[Christian Lydemann]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 13:37:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27628</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27496&quot;&gt;M.S. vignesh&lt;/a&gt;.

Yes, that is exactly what I said.

The point is to keep the value in the stream until the end destination. Most commonly in an NgRx setup that would be either in the template (using async pipe) or in an effect (using withLatestFrom). That is the most common cases. I know there are exceptions, as the one I stated in the article, but as a general guideline, this will save you from a lot of pain :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27496">M.S. vignesh</a>.</p>
<p>Yes, that is exactly what I said.</p>
<p>The point is to keep the value in the stream until the end destination. Most commonly in an NgRx setup that would be either in the template (using async pipe) or in an effect (using withLatestFrom). That is the most common cases. I know there are exceptions, as the one I stated in the article, but as a general guideline, this will save you from a lot of pain 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Lydemann		</title>
		<link>https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27627</link>

		<dc:creator><![CDATA[Christian Lydemann]]></dc:creator>
		<pubDate>Sun, 29 Dec 2019 13:35:00 +0000</pubDate>
		<guid isPermaLink="false">https://christianlydemann.com/?p=11273#comment-27627</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27398&quot;&gt;Chandler Fang&lt;/a&gt;.

I think, you are really working against the observable pattern when you map to a state property.
As soon as it is out of the stream, you need to handhold imperative code and lose the reactive control which will save you from bugs and race conditions.
Can you explain an example, where you think a state property would be appropriate?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://christianlydemann.com/refactoring-angular-apps-to-reactive-architecture/#comment-27398">Chandler Fang</a>.</p>
<p>I think, you are really working against the observable pattern when you map to a state property.<br />
As soon as it is out of the stream, you need to handhold imperative code and lose the reactive control which will save you from bugs and race conditions.<br />
Can you explain an example, where you think a state property would be appropriate?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 0/1329 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-23 23:14:40 by W3 Total Cache
-->