<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Oleksandr Sachuk</title>
    <description>The latest articles on DEV Community by Oleksandr Sachuk (@oleksandrsachuk).</description>
    <link>https://dev.to/oleksandrsachuk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F128137%2F3ecd7237-76f0-4a6c-beda-ee9a836f8b6e.jpeg</url>
      <title>DEV Community: Oleksandr Sachuk</title>
      <link>https://dev.to/oleksandrsachuk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oleksandrsachuk"/>
    <language>en</language>
    <item>
      <title>How to style helperText in the TextField material-ui component</title>
      <dc:creator>Oleksandr Sachuk</dc:creator>
      <pubDate>Fri, 20 Sep 2019 07:06:21 +0000</pubDate>
      <link>https://dev.to/oleksandrsachuk/how-to-style-helpertext-in-the-textfield-material-ui-component-cob</link>
      <guid>https://dev.to/oleksandrsachuk/how-to-style-helpertext-in-the-textfield-material-ui-component-cob</guid>
      <description>&lt;p&gt;Add custom styles to the “material-ui” component may be a challenge sometimes.  &lt;/p&gt;

&lt;p&gt;For example, I need to add additional custom styles to the “TextField” component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe6t3o4d9uefgeam1najm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe6t3o4d9uefgeam1najm.png" alt="helperText"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tried different solutions and spent a lot of time to find the most simple one.  &lt;/p&gt;

&lt;p&gt;In the end, I found that it is a possible just pass “FormHelperTextProps” property with “className” key.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Hope, this solution saves you time!&lt;/p&gt;

</description>
      <category>react</category>
      <category>materialui</category>
    </item>
    <item>
      <title>Handle async actions by the RxJS and Redux-observable</title>
      <dc:creator>Oleksandr Sachuk</dc:creator>
      <pubDate>Fri, 20 Sep 2019 06:34:59 +0000</pubDate>
      <link>https://dev.to/oleksandrsachuk/handle-async-actions-by-the-rxjs-and-redux-observable-44mo</link>
      <guid>https://dev.to/oleksandrsachuk/handle-async-actions-by-the-rxjs-and-redux-observable-44mo</guid>
      <description>&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Code example&lt;/li&gt;
&lt;li&gt;RxJS operators&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code example &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;RxJS and Redux-observable are very useful to handle async actions.&lt;br&gt;
I would like to show an example usage RxJS and Redux-observable in the react app.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;First of all, we wait for some action in the ofType.&lt;/p&gt;

&lt;h3&gt;
  
  
  RxJS operators &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Later we use switchMap operator.&lt;/p&gt;

&lt;p&gt;I prefer to use switchMap which returns an ‘inner’ Observable and stops emitting items from the earlier-emitted inner Observable and begins emitting items from the new one.&lt;/p&gt;

&lt;p&gt;For instance, if async action calls several times ‘switchMap’ cancel a subscription to the previous async action call and wait for the result of the latest one.&lt;/p&gt;

&lt;p&gt;Inside “switchMap” you can get access to the action payload if it provided.&lt;/p&gt;

&lt;p&gt;As mentioned previously “switchMap” returns an inner Observable, for instance, promise.&lt;/p&gt;

&lt;p&gt;From the inner observable you create a separate pipe to handle async action result.&lt;/p&gt;

&lt;p&gt;First of all, I would like to pay attention to the “startWith” operator to set pending action from the start.&lt;/p&gt;

&lt;p&gt;For the success, handling I prefer to use “flatMap” which in general mining like a then in promises and catchError for the error handling.&lt;/p&gt;

&lt;p&gt;Please, pay attention that all operators (startWith, flatMap and catchError) are inside “inner” Observable for handling async promise.&lt;/p&gt;

&lt;p&gt;This is a very simple and easy way of reading to handle async actions.&lt;br&gt;
And the latest thing, don’t forget to add an epic to the “combineEpics” from redux-observable.&lt;/p&gt;

</description>
      <category>react</category>
      <category>rxjs</category>
      <category>reduxobservable</category>
    </item>
  </channel>
</rss>
