Skip to content

Simplest case examples on VueJS 2

Notifications You must be signed in to change notification settings

palashmon/learn-vue2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning VueJS 2 Basics

Learning VueJS 2 Basics

This repo contains some simplest case examples on VueJS 2 for learning purpose. I also add my daily logs here, about what I have learned so far to keep track of my progress.


DAILY LOGS

Day 1: 24 Oct 2017

  • Learned about creating a new Vue Instance and declarative rendering.

Day 2: 25 Oct 2017

  • Learned about handling data and methods in VueJS 2.
  • Learned about data binding and interpolation.

Day 3: 26 Oct 2017

Day 4: 30 Oct 2017

Day 5: 31 Oct 2017

Day 6: 2 Nov 2017

  • Learned about how we can use the v-for directive to render a list of items based on an array, object and template.
  • Worked on a small assignment to create a small game using all VueJS concepts learned so far.

Day 7: 4 Nov 2017

  • Learned about using multiple Vue Instances and interacting between them.
  • Also, learned about using Components in Vue.

Day 8: 6 Nov 2017

  • Learned about using Refs in VueJS.
  • ref is used to register a reference to an element or a child component.
  • Learned about vue-cli, for scaffolding Vue.js projects.

Day 9: 9 Nov 2017

  • Looked into Vue files & the root Component.
  • Created our first *.vue file.
  • Learned about nesting components both globally and locally.

Day 10: 10 Nov 2017

  • Learned about Component-Scoped CSS
  • Component-Scoped CSS helps in creating styling that is scoped to single-file component only and this styling does not interferes with other component styling.

Day 11: 13 Nov 2017

  • Learned more about nesting components.
  • Created separate components for header, footer & content

Day 12: 14 Nov 2017

  • Learned about props in VueJS.
  • A prop is a custom attribute for passing information from parent components.
  • In Vue, the parent-child component relationship can be summarized as props down, events up. The parent passes data down to the child via props, and the child sends messages to the parent via events.

Day 13: 15 Nov 2017

  • Today learned about Primitive vs Reference types of props passed from parent to child and how it effects parent data once prop data is modified in child components in case of reference type data.
  • Primitive types include String, Number, Boolean and Symbol.
  • Reference types include Object and Array.

Day 14: 16 Nov 2017

  • Learned about using v-on with Custom Events.
  • We can actually listen to an $emit event from a child with v-on in parent component.

Day 15: 17 Nov 2017

  • Learned about creating a global Event Bus with VueJS.
  • We could manage communication between components with a single event bus.

Day 16: 20 Nov 2017

  • Learned about Vue lifecycle hooks.
  • It gives users the opportunity to add their own code at specific stages Vue instance initialization.
  • For example, the created hook can be used to run code after an instance is created.
new Vue({
	data: {
		a: 1
	},
	created: function() {
		// `this` points to the vm instance
		console.log('a is: ' + this.a);
	}
});
// => "a is: 1"

Day 17: 22 Nov 2017

  • Today learned about using slots in VueJS.
  • It mainly allow a parent component to pass DOM elements into a child component.

Day 18: 23 Nov 2017

  • Learned about using Dynamic Components.
  • We can dynamically switch between multiple components using the reserved <d> element and dynamically bind to its is attribute.
<component v-bind:is="currentView">
  <!-- component changes when currentView data changes! -->
</component>

Day 19: 28 Nov 2017

  • Learned about basic usage of form input binding.
  • Learned about form modifiers like .lazy, .number and .trim.

Day 20: 29 Nov 2017

  • Learned about single checkbox and multiple checkboxes binding.

Day 21: 30 Nov 2017

  • Learned about select box binding.
  • Also, about how we can make HTTP post requests using vue-resource.

Day 22: 01 Dec 2017

  • Learned about how we can make HTTP GET request using vue-resource.
  • Also, about how we can read & display the response data returned from this http request.

Day 23: 02 Dec 2017

<div>
    <!-- 'capitalize' is a filter function which will receive the value of 'message' as its argument -->
    {{ message | capitalize }}
</div>

Day 25: 04 Dec 2017

  • Created a custom search filter using computed properties.
  • Learned about how we can register filters and directives locally.
  • Also, about how to use mixins.
  • Mixins are a flexible way to distribute reusable functionalities for Vue components.

Day 26: 05 Dec 2017

Day 27: 07 Dec 2017

Day 28: 11 Dec 2017

  • Learned about Dynamic Route Matching.
  • Also, learned how we can fetch dynamic segment in route path, which start with a colon :.
const router = new VueRouter({
	routes: [
		// dynamic segments start with a colon
		{ path: '/user/:id', component: User }
	]
});
  • You can check out a simple live example here.

Day 29: 12 Dec 2017

  • Learned about setting up Firebase database.
  • Learned about saving data to Firebase database.

Day 30: 18 Dec 2017

  • Learned about how we can retrieve posts from Firebase.
  • Display specific post based on post key stored in Firebase.