background preloader

Vue.js

Facebook Twitter

Learn Vue 2: Step By Step. What is the best vue html-way to fetch data from external servers? Create an App in VueJS 2. TL;DR VueJS has a new version coming out.

Create an App in VueJS 2

Check out all the changes here. There is a working example of an application built using this new version here. The code can be found on Github. Get out there and make something awesome! VueJS is coming out with a new version. However, in the next version, it switches some things around. "VueJS 2.0, like React, uses a ‘Virtual DOM’ and allows you to choose the kind of templating you want" TWEET THIS Let's build a simple application using Express, PassportJS, and VueJS 2.0 to demonstrate how to setup authentication in an application and then how to communicate with our backend server from the client side. First things first. Mkdir vuejs2-authentication cd vuejs2-authentication npm init -y npm install npm install. Server-side rendering and Redux: from React to Inferno. React has been a major actor in the new Javascript trending.

Server-side rendering and Redux: from React to Inferno

Its open-source component-based environment made web development far easier and pleasuring. With its concept, we are able to create powerful web apps running on the old buddy JS. However, it came with some downsides, and one of them relates to the size of the applications (the library itself weighs 45 kb). A new trending of developing new lightweight libraries has come, and with them Inferno: And what’s cool: Inferno is React-like.

In this page I will show this, with a small sample of server-side rendering written in React; and the very same sample written in Inferno. I’m also using Redux, even if I don’t really need it here, I used it just for fun :) Getting Started With Vue.js. Intro to Vue.js: Rendering, Directives, and Events. By Sarah Drasner On directives, events, JavaScript, vue If I was going to sum up my experiences with Vue in a sentence, I'd probably say something like "it's just so reasonable" or "It gives me the tools I want when I want them, and never gets in my way".

Intro to Vue.js: Rendering, Directives, and Events

Again and again, when learning Vue, I smiled to myself. It just made sense, elegantly. Working with Methods in Vue.js. In previous videos, we have seen how we can output data with string interpolation.

Working with Methods in Vue.js

But what if we need to output data based on certain rules or logic? In that case, it might be handy to have a function in which we can embed JavaScript logic. Or perhaps we want to fetch data from a remote service or something like that. For this purpose, it’s time to introduce a new property to our Vue instance; the methods property. This property should contain an object where the key is the name of a function, and the value is the function itself. Let’s see an example of this. To output my full name, I could of course concatenate these two data properties with string interpolation with a space in-between, or simply output them by using string interpolation twice.

As mentioned early, functions have to be added under the methods property. The key within this object will be the name of the method. Alright, so now that we have implemented our method, let’s use it from within our template. Learn Vue 2: Step By Step. Introduction to CSS Animations (With a Sprinkle of Vue.js) Introduction Since launching and running the Daily CSS Images challenge, I’ve noticed that a lot of people have had a lot of fun by adding CSS animations to their images, which has been super cool to witness!

Introduction to CSS Animations (With a Sprinkle of Vue.js)

However, I am sure there are many other participants who see these animations and are wondering, “That looks cool…how do I do that?” In fact, it wasn’t too long ago that I was in the same situation. I would see pens on Codepen with this weird thing called “@keyframes”, and I thought to myself, “Sure would be nice to know what this all means...” After some study and practice, I quickly realized that CSS animations were actually very easy to get started with. My hope is that this tutorial helps people who were in the same boat as me, wanting to learn CSS animation, but a bit unsure. Getting Started With Vue.js. React’s JSX vs Vue’s templates: a showdown on the front end. React or Vue: Which Javascript UI Library Should You Be Using? In 2016 React cemented its position as king of the Javascript web frameworks.

React or Vue: Which Javascript UI Library Should You Be Using?

This year saw rapid growth of both its web and native mobile libraries, and a comfortable lead over main rival Angular. But 2016 has been an equally impressive year for Vue. The release of its version 2 made a huge impression on the Javascript community, attested to by the 25,000 extra Github stars it gained this year. The scope of both React and Vue is undeniably similar: both are lightweight component-based libraries for building user interfaces that focus on the view layer only. Load Boostrap 4 alpha into Vue.js project – NamekDev. Once upon a time one usually desires to add Bootstrap into one’s project.

Load Boostrap 4 alpha into Vue.js project – NamekDev

Adding support for Bootstrap might seem a little hard without understanding Webpack or even despite the understanding. VueBoot. VueBoot is a project designed to ease the use of Bootstrap in VueJS applications.

VueBoot

It takes the approach that the Bootstrap team has done a lot of hard work, and reproducing that work is beyond this project's scope. Because of that, we choose to use the official Bootstrap javascript, and simply wrap the API in a thin VueJS wrapper. VueBoot has the following dependencies: GitHub - GuillaumeLeclerc/vue-google-maps: Google maps component for vue with 2-way data binding. Vue.js Project Setup - Vue.js 2.0 Fundamentals (Part 2) Learning the Basics.