<?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: Atharva Sharma</title>
    <description>The latest articles on DEV Community by Atharva Sharma (@atharva3010).</description>
    <link>https://dev.to/atharva3010</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%2F354007%2F7c98eb67-d510-4549-ad45-6d7954ab7010.jpeg</url>
      <title>DEV Community: Atharva Sharma</title>
      <link>https://dev.to/atharva3010</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atharva3010"/>
    <language>en</language>
    <item>
      <title>Do you know these 5 things about Vue Lifecycle Hooks?</title>
      <dc:creator>Atharva Sharma</dc:creator>
      <pubDate>Thu, 11 Jun 2020 15:14:06 +0000</pubDate>
      <link>https://dev.to/atharva3010/do-you-know-these-5-things-about-vue-lifecycle-hooks-4c78</link>
      <guid>https://dev.to/atharva3010/do-you-know-these-5-things-about-vue-lifecycle-hooks-4c78</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Vue Lifecycle Hooks are an example of the &lt;strong&gt;Template Method Design Pattern&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the case of &lt;strong&gt;SSR&lt;/strong&gt;, only the &lt;strong&gt;creation hooks&lt;/strong&gt; are run on the &lt;strong&gt;server-side&lt;/strong&gt;, all &lt;strong&gt;other hooks&lt;/strong&gt; are run &lt;strong&gt;client-side&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vue has an &lt;code&gt;errorCaptured()&lt;/code&gt; hook and contrary to what you might believe, it &lt;strong&gt;does not capture&lt;/strong&gt; all the errors thrown inside the component. Setting up a &lt;strong&gt;global error handler is suggested&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can do &lt;strong&gt;programmatic lifecycle hook registration&lt;/strong&gt; using &lt;code&gt;$on&lt;/code&gt; or &lt;code&gt;$once&lt;/code&gt; and pre-pending the hook name with &lt;code&gt;hook:&lt;/code&gt;. Similarly, you can also &lt;strong&gt;listen to lifecycle hooks from children components&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is a significant delay between the &lt;code&gt;created()&lt;/code&gt; and the &lt;code&gt;mounted()&lt;/code&gt; hook.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I cover all the above-mentioned points and more in my talk &lt;a href="https://youtu.be/SS8gN7IyJE8"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MeRnHWZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bs1xa7c0fr05mw5egvou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MeRnHWZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bs1xa7c0fr05mw5egvou.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Decentralised web apps: How to Deploy your web app onto IPFS with Fleek</title>
      <dc:creator>Atharva Sharma</dc:creator>
      <pubDate>Sun, 22 Mar 2020 19:52:23 +0000</pubDate>
      <link>https://dev.to/atharva3010/decentralised-web-apps-how-to-deploy-your-web-app-onto-ipfs-with-terminal-284p</link>
      <guid>https://dev.to/atharva3010/decentralised-web-apps-how-to-deploy-your-web-app-onto-ipfs-with-terminal-284p</guid>
      <description>&lt;p&gt;So I have been doing Frontend Development for a few years now and while I have tried different deployment solutions in the past, never did I come across a one-click solution for deploying to the &lt;a href="https://ipfs.io/"&gt;InterPlanetary File System (IPFS)&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing &lt;a href="https://fleek.co/"&gt;Fleek&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;From local development to global deployment, Fleek is everything you need to build fast modern websites hosted on IPFS. Welcome to the new internet.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Vue + Fleek = Decentralised Magic?
&lt;/h3&gt;

&lt;p&gt;Fleek provides an easy to set up solution for continous deployment using git. Once set up, it tracks for new changes to your repository and triggers deployments accordingly.&lt;br&gt;
While almost all sites &amp;amp; popular frameworks are supported by Fleek, for the purpose of this tutorial I will be using Vue CLI 4 to set up a &lt;a href="https://vuejs.org/"&gt;Vue.js&lt;/a&gt; app.&lt;/p&gt;
&lt;h3&gt;
  
  
  Gathering our tools
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;If you already know how to set up a Vue CLI project, you can directly jump to this section&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Make sure that you have Node.js version 8.9 or above installed (8.11.0+ recommended). If not, you can do so by heading over &lt;a href="https://nodejs.org/"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;em&gt;&lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt; comes preinstalled with &lt;a href="https://nodejs.org/"&gt;node.js&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For installing Vue CLI 4, run the commands below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @vue/cli
# OR
yarn global add @vue/cli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Note: &lt;em&gt;You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can check you have the right version with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vue --version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Setting up the project
&lt;/h3&gt;

&lt;p&gt;Let's call our app "decentralised-vue" and set up a new project by that name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vue create decentralised-vue
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now select the options/preset of your choice, for this tutorial I am selecting these options: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GOIHC8yC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/3WsC9BN/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GOIHC8yC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/3WsC9BN/image.png" alt="features-needed-for-the-project"&gt;&lt;/a&gt;&lt;br&gt;
After the project is set up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd decentralised-vue
npm run serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's go to &lt;a href="http://localhost:8080/"&gt;localhost:8080&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rrmnWG3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/WcdsTKk/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rrmnWG3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/WcdsTKk/image.png" alt="decentralised-vue-project-home"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying Through Fleek
&lt;/h3&gt;

&lt;p&gt;We now need to create a &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt; repository to store our project so Fleek can pick it up. You can create a repository and link it to our project using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add &amp;lt;name&amp;gt; &amp;lt;url&amp;gt;

git push &amp;lt;name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The repository for this project can be found &lt;a href="https://github.com/atharva3010/decentralised-vue"&gt;here&lt;/a&gt;. Now, we must go to &lt;a href="https://fleek.co/"&gt;Fleek.co&lt;/a&gt;, login and add a new site by clicking on the "Add new site" button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x2PRwQDD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/CHCtySx/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x2PRwQDD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/CHCtySx/image.png" alt="add-site-to-fleek"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connect with GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p3upfoVZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/9nJhMLx/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p3upfoVZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/9nJhMLx/image.png" alt="connect-with-github"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the project repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O21mmekU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Vtx0kVx/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O21mmekU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Vtx0kVx/image.png" alt="select-project-repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fleek will automatically determine the build commands:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1_8HKRGS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/V9ZYBPw/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1_8HKRGS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/V9ZYBPw/image.png" alt="build-commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure that the build directory is &lt;code&gt;dist&lt;/code&gt;:&lt;br&gt;
&lt;em&gt;You can also specify any environment variables if your project requires them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dMZUfIsK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/nRWZK4h/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dMZUfIsK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/nRWZK4h/image.png" alt="build-options"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click "Deploy site" button, it will take a few mins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f_aKyE6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/5M0q6sP/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f_aKyE6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/5M0q6sP/image.png" alt="deploying-site"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Voila! Now your site is deployed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JvkoW6GA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/N6PvSsh/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JvkoW6GA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/N6PvSsh/image.png" alt="deployed-site"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see the project &lt;a href="https://hidden-star-2877.on.fleek.co/"&gt;deployed here&lt;/a&gt;. You can also set a custom domain by going to Settings &amp;gt; Domain Management, &lt;a href="https://docs.fleek.co/DomainHTTPS#customdomains"&gt;you can also read about it here&lt;/a&gt;. &lt;br&gt;
This is how easy it is to deploy apps onto IPFS using Fleek.&lt;/p&gt;

&lt;p&gt;For further reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.fleek.co/"&gt;Fleek docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.ipfs.io/"&gt;IPFS docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vuejs.org/v2/guide/"&gt;Vue.js docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>vue</category>
      <category>blockchain</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
