<?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: Charanjit Singh</title>
    <description>The latest articles on DEV Community by Charanjit Singh (@cjsingh).</description>
    <link>https://dev.to/cjsingh</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%2F214499%2F2945e838-9bb6-495c-ac88-3a77d040e902.gif</url>
      <title>DEV Community: Charanjit Singh</title>
      <link>https://dev.to/cjsingh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cjsingh"/>
    <language>en</language>
    <item>
      <title>Which is better for a CRM? Django with PSQL or NodeJS with MongoDB?</title>
      <dc:creator>Charanjit Singh</dc:creator>
      <pubDate>Fri, 31 Jul 2020 10:49:26 +0000</pubDate>
      <link>https://dev.to/cjsingh/which-is-better-for-a-crm-django-with-psql-or-nodejs-with-mongodb-47pe</link>
      <guid>https://dev.to/cjsingh/which-is-better-for-a-crm-django-with-psql-or-nodejs-with-mongodb-47pe</guid>
      <description>&lt;p&gt;Which one is better? Considering following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Realtime Updates on client [ For Eg. a Contact is updated ]&lt;/li&gt;
&lt;li&gt;Database Schema could change as per new requirements.&lt;/li&gt;
&lt;li&gt;Database might need to be sharded in future.&lt;/li&gt;
&lt;li&gt;REST API for clients.&lt;/li&gt;
&lt;li&gt;Less[No] Vulneribilities.&lt;/li&gt;
&lt;li&gt;Easily Integratable with other systems like hubspot.&lt;/li&gt;
&lt;li&gt;Scheduling and Queue Management.&lt;/li&gt;
&lt;li&gt;Better Coding experience.&lt;/li&gt;
&lt;li&gt;Distributed System.&lt;/li&gt;
&lt;li&gt;Millions of requests per minute.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>help</category>
      <category>django</category>
      <category>node</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to access DVA Store in UMI application?</title>
      <dc:creator>Charanjit Singh</dc:creator>
      <pubDate>Fri, 31 Jul 2020 10:39:39 +0000</pubDate>
      <link>https://dev.to/cjsingh/how-to-access-dva-store-in-umi-application-38d9</link>
      <guid>https://dev.to/cjsingh/how-to-access-dva-store-in-umi-application-38d9</guid>
      <description>&lt;p&gt;Hi most of the react developers would find &lt;code&gt;dvaJS&lt;/code&gt; and &lt;code&gt;umiJS&lt;/code&gt;, heaven for state management and application development. Dva is elm based state management tool that use &lt;code&gt;react-redux&lt;/code&gt; for state management.&lt;/p&gt;

&lt;p&gt;Q: How to access DVA Store in UMI application, outside the component or without &lt;code&gt;connect&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Q: How to dispatch DVA Store in UMI application, outside the component or without &lt;code&gt;connect&lt;/code&gt;?&lt;/p&gt;

&lt;h1&gt;
  
  
  Answer
&lt;/h1&gt;

&lt;p&gt;Q: How to access DVA Store in UMI application, outside the component or without &lt;code&gt;connect&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;A: &lt;a href="https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch"&gt;https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It says use:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.g_app._store
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Q: How to &lt;code&gt;dispatch&lt;/code&gt; DVA Store in UMI application, outside the component or without &lt;code&gt;connect&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;A: &lt;a href="https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch"&gt;https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It says use:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.g_app._store.dispatch('namespace/action')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  Bonus:
&lt;/h1&gt;

&lt;p&gt;Q: How to &lt;code&gt;get state of&lt;/code&gt; DVA Store in UMI application, outside the component or without &lt;code&gt;connect&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;A: &lt;a href="https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch"&gt;https://v2.umijs.org/guide/with-dva.html#how-to-access-store-or-dispatch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It says use:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.g_app._store.getState()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Available Functions:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;asyncReducers: {}
dispatch: ƒ ()
getState: ƒ f()
replaceReducer: ƒ (n)
runSaga: ƒ ()
subscribe: ƒ subscribe(listener)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Recommended: Instead of directly using it, write a Util that exports these functions.&lt;/p&gt;

&lt;p&gt;Refer to &lt;a href="https://stackoverflow.com/questions/63073047/how-to-access-dva-store-in-umi-application/63073048#63073048"&gt;https://stackoverflow.com/questions/63073047/how-to-access-dva-store-in-umi-application/63073048#63073048&lt;/a&gt; for discussion on StackOverflow&lt;/p&gt;

</description>
      <category>umi</category>
      <category>react</category>
      <category>redux</category>
      <category>dva</category>
    </item>
  </channel>
</rss>
