
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vuejs Tutorials Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/vuejs-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/vuejs-tutorials/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Wed, 04 Nov 2020 22:52:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>Vuejs Tutorials Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/vuejs-tutorials/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>Vuejs Computed Properties vs Methods Comparison With Example</title>
		<link>https://www.technig.com/vuejs-computed-properties-vs-methods-comparison/</link>
					<comments>https://www.technig.com/vuejs-computed-properties-vs-methods-comparison/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Thu, 23 Nov 2017 14:51:41 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Developer]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[Learn JavaScript]]></category>
		<category><![CDATA[Learn Vuejs]]></category>
		<category><![CDATA[Software Developer]]></category>
		<category><![CDATA[Vuejs]]></category>
		<category><![CDATA[Vuejs Tips]]></category>
		<category><![CDATA[Vuejs Tutorials]]></category>
		<category><![CDATA[Web Designing]]></category>
		<category><![CDATA[Web Developer]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=13873</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Vuejs Computed Properties VS Methods Comparison - Technig" decoding="async" fetchpriority="high" srcset="https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig.jpg 840w, https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig-300x150.jpg 300w, https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig-768x384.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div>
<p>Vue js is becoming more and more popular every day. It has a community of great developers. Also, you can develop almost any types of a web application with Vue. Besides, The Vue.js is an open-source progressive JavaScript framework for building user interfaces. Vue can also function as a web application framework capable of powering advanced [&#8230;]</p>
<p>The post <a href="https://www.technig.com/vuejs-computed-properties-vs-methods-comparison/">Vuejs Computed Properties vs Methods Comparison With Example</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Vuejs Computed Properties VS Methods Comparison - Technig" decoding="async" srcset="https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig.jpg 840w, https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig-300x150.jpg 300w, https://www.technig.com/wp-content/uploads/2017/11/vuejs-computed-properties-vs-methods-comparison-technig-768x384.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div><p><a href="https://www.technig.com/introduction-learn-vuejs-framework/">Vue</a> js is becoming more and more <a href="https://www.technig.com/best-javascript-frameworks/">popular</a> every day. It has a community of great developers. Also, you can develop almost any types of a web application with Vue. Besides, The Vue.js is an open-source progressive JavaScript framework for building user interfaces. Vue can also function as a web application framework capable of powering advanced single-page applications. In this article, you will learn about Vuejs computed properties vs methods. Also, where should you use methods and where should you use computed properties.</p>
<h2>Vuejs Computed Properties VS Methods</h2>
<p>Firstly, I expect you know the basics of Vue and want&#8217;s to learn the differences between computed property and methods. So, we will discuss with clear and real-life examples.</p>
<p>You write the computed properties and methods almost in the same way. Let&#8217;s see an example and then we will explain it more.</p>
<p>[codepen_embed height=&#8221;432&#8243; theme_id=&#8221;0&#8243; slug_hash=&#8221;GOxPbN&#8221; default_tab=&#8221;js,result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;https://codepen.io/Hujjat/pen/GOxPbN/&#8217;&gt;GOxPbN&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;https://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;https://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<p>In the above example, we have a collection of tasks. Then, we display them based on completed and incompleted tasks.<strong> As you can see</strong>, we have once computed property and one method. They do almost the same thing but opposite to each other.</p>
<p>Return completed tasks:</p>
<pre class="theme:sublime-text lang:js decode:true">  computed: {
    completedTasks() {
      return this.tasks.filter(task =&gt; task.completed);
    }
  }</pre>
<p>Return Incompleted tasks:</p>
<pre class="theme:sublime-text lang:js decode:true">methods: {
    InCompletedTasks() {
      return this.tasks.filter(task =&gt; !task.completed);
    }
  }</pre>
<blockquote><p><strong>Note</strong>: As you can see, we could use computed property or methods for both. Instead, we put them in two ways so that you can understand that,<em> what we can do with methods can be done with computed properties as well.</em></p></blockquote>
<p>So, there are some significant difference and usage you should consider while using them.</p>
<h2>Computed Properties</h2>
<p>In a nutshell, computed properties are called computed value as well. It means, they update and can be changed anytime. Also, it caches the data until it changes. When the Vue is instantiated, computed properties are converted into a property. Therefore, you reference a computed property just like you would a data property.</p>
<p><a href="https://vuejs.org/v2/guide/computed.html">Example</a>:</p>
<pre class="theme:sublime-text lang:js decode:true">var vm = new Vue({
  el: '#example',
  data: {
    message: 'Hello'
  },
  computed: {
    // a computed getter
    reversedMessage: function () {
      // `this` points to the vm instance
      return this.message.split('').reverse().join('')
    }
  }
})</pre>
<p>You can use it like this.</p>
<div id="example">
<pre class="lang:default decode:true">&lt;p&gt;Original message: "{{ message }}" &lt;/p&gt;
&lt;p&gt;Computed reversed message: "{{ reversedMessage }}"&lt;/p&gt;</pre>
</div>
<p>As you can see, the <span style="background-color: #dbdbdb;"><em>reverse message </em></span>is not written like function. It&#8217;s just like a keyword. Additionally, you can&#8217;t pass a value to a computed property despite the fact that it&#8217;s like function.</p>
<h2>Methods</h2>
<p>You probably work with function a lot. Methods are the same as function and work the same way. Besides, a method does nothing unless you call it. Also, like all javascript functions, it accepts parameters and will be re-evaluated every time it&#8217;s called. After that, they can&#8217;t cache values.<em> Additionally, you must use methods when you want to pass a value to modify it. </em></p>
<p>Example:</p>
<p>[codepen_embed height=&#8221;305&#8243; theme_id=&#8221;0&#8243; slug_hash=&#8221;yPjjyg&#8221; default_tab=&#8221;html,result&#8221; user=&#8221;Hujjat&#8221;]See the Pen &lt;a href=&#8217;https://codepen.io/Hujjat/pen/yPjjyg/&#8217;&gt;Vuejs example for tutorial&lt;/a&gt; by Hujjat Nazari (&lt;a href=&#8217;https://codepen.io/Hujjat&#8217;&gt;@Hujjat&lt;/a&gt;) on &lt;a href=&#8217;https://codepen.io&#8217;&gt;CodePen&lt;/a&gt;.[/codepen_embed]</p>
<p>As you can see. We can call it like a function and pass value. Then, you can change it or add something.</p>
<blockquote>
<p style="text-align: left;">In a nutshell, if you want to pass value, methods are good. Otherwise, computed properties are better for cache and speed.</p>
</blockquote>
<h2>Conclusion</h2>
<p>I hope the Vuejs computed properties VS methods compression has been informative for you. If you have any questions or suggestions, feel free to comment below. Besides, you can join our forum and ask questions frequently.</p>
<p>The post <a href="https://www.technig.com/vuejs-computed-properties-vs-methods-comparison/">Vuejs Computed Properties vs Methods Comparison With Example</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/vuejs-computed-properties-vs-methods-comparison/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13873</post-id>	</item>
		<item>
		<title>How to Solve vue Command not found on Windows?</title>
		<link>https://www.technig.com/solve-vue-command-not-found-windows/</link>
					<comments>https://www.technig.com/solve-vue-command-not-found-windows/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Mon, 02 Oct 2017 05:30:16 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Free Developer Software]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[How to Fix]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[Vuejs]]></category>
		<category><![CDATA[Vuejs Tutorials]]></category>
		<category><![CDATA[Web Designing]]></category>
		<category><![CDATA[Web Development]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=11486</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="How to solve vue command not found on windows" decoding="async" srcset="https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows.png 840w, https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows-300x150.png 300w, https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows-768x384.png 768w" sizes="(max-width: 840px) 100vw, 840px" /></div>
<p>Vuejs is by far the most popular JavaScript framework nowadays. So, if you want to build an appealing and brilliant web application, definitely you should learn Vue. Also, it&#8217;s becoming more popular day by day. The job opportunities are a lot for this framework. Besides, they have a community of great and active people who [&#8230;]</p>
<p>The post <a href="https://www.technig.com/solve-vue-command-not-found-windows/">How to Solve vue Command not found on Windows?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="How to solve vue command not found on windows" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows.png 840w, https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows-300x150.png 300w, https://www.technig.com/wp-content/uploads/2017/09/How-to-solve-vue-command-not-found-on-windows-768x384.png 768w" sizes="(max-width: 840px) 100vw, 840px" /></div><p>Vuejs is by far the most popular JavaScript framework nowadays. So, if you want to build an appealing and brilliant web application, definitely you should learn Vue. Also, it&#8217;s becoming more popular day by day. The job opportunities are a lot for this framework. Besides, they have a community of great and active people who can help you in anytime. So, Vue-CLI is one of the many features of <a href="https://vuejs.org/">Vue</a>. One of the most common problems that beginners face is how to install and configure it. Furthermore, you will learn how to solve Vue command not found error step by step with an example.</p>
<h2>1. What&#8217;s Vue-CLI?</h2>
<p>In the first place, you must know what&#8217;s Vue-CLI? Shortly, <a href="https://github.com/vuejs/vue-cli">Vue-CLI</a> let you install Vue applications or templates with the command line. For instance, when you install Laravel, you use a command line, so, the same case with Vue.</p>
<h2>2. How to install Vue-CLI</h2>
<p>To install Vue-CLI, you must have Nodejs and Git installed on your system. So, if you don&#8217;t have Nodejs, just go to their website and download the current version.</p>
<p>Install Vue-CLI with the following command</p>
<pre class="lang:default decode:true">npm install -g vue-cli</pre>
<p>It will install Vue-CLI globally, which according to the documentation when you install any NPM package globally, you can access it through the command line.</p>
<p>Open your command line and run the following command.</p>
<pre class="lang:default decode:true ">vue init webpack my-project</pre>
<p>The above command normally installs a demo project form Webpack, but you should get an error.</p>
<figure id="attachment_11489" aria-describedby="caption-attachment-11489" style="width: 674px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2017/09/vue-is-not-recognized-as-an-internal-or-external-command.png"><img loading="lazy" decoding="async" class="wp-image-11489 size-full" src="https://www.technig.com/wp-content/uploads/2017/09/vue-is-not-recognized-as-an-internal-or-external-command.png" alt="'vue' is not recognized as an internal or external command" width="674" height="243" srcset="https://www.technig.com/wp-content/uploads/2017/09/vue-is-not-recognized-as-an-internal-or-external-command.png 674w, https://www.technig.com/wp-content/uploads/2017/09/vue-is-not-recognized-as-an-internal-or-external-command-300x108.png 300w" sizes="(max-width: 674px) 100vw, 674px" /></a><figcaption id="caption-attachment-11489" class="wp-caption-text">&#8216;vue&#8217; is not recognized as an internal or external command</figcaption></figure>
<p>Or your error might be list Vue command not found.</p>
<h2>How to Solve Vue command not found</h2>
<p>In order to solve this problem, you should add the Vue path to your environment variable manually. So, here is how you can do that.</p>
<ul>
<li>Press Win + R</li>
<li>Type &#8220;<strong>control sysdm.cpl,,3</strong>&#8221; and press enter</li>
<li>Press N to open environment variables.</li>
<li>Select the path and click Edit.</li>
<li>Click new to add a new path.</li>
<li>Paste the path to NPM folder in your AppData.</li>
<li>Click OK for all windows and you are done.</li>
</ul>
<p>NPM path is normally in the following folder. Just change your username on your system.</p>
<pre class="lang:default decode:true ">C:\Users\UserName\AppData\Roaming\npm</pre>
<p>Your show hidden files option must be on the view this files.</p>
<figure id="attachment_11490" aria-describedby="caption-attachment-11490" style="width: 1024px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path.png"><img loading="lazy" decoding="async" class="wp-image-11490 size-large" src="https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path-1024x668.png" alt="Add new windows env path" width="1024" height="668" srcset="https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path.png 1024w, https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path-300x196.png 300w, https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path-768x501.png 768w, https://www.technig.com/wp-content/uploads/2017/09/Add-new-windows-env-path-210x136.png 210w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption id="caption-attachment-11490" class="wp-caption-text">Add new windows env path</figcaption></figure>
<p>You are done now. So, this time if you open the command line and type the following command, it should install the Webpack demo template in the current directory.</p>
<pre class="lang:default decode:true">vue init webpack my-project</pre>
<p>After installing, you can run the following command to open the project in the browser.</p>
<pre class="lang:default decode:true ">npm run dev</pre>
<p>So, it will run a server in the following URL</p>
<pre class="lang:default decode:true ">http://localhost:8080/#/</pre>
<h2>Conclusion</h2>
<p>All in all, it was that easy. Besides learning what&#8217;s Vue-CLI, you learned how to install it from the command line. So, if you have any questions or problems related to how to solve Vue command not found, feel free to comment it below.</p>
<p>The post <a href="https://www.technig.com/solve-vue-command-not-found-windows/">How to Solve vue Command not found on Windows?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/solve-vue-command-not-found-windows/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11486</post-id>	</item>
	</channel>
</rss>
