hello.js

var please = require('share');
console.log('thank you');

Friday, 10 March, 2017 UTC

Vue.js Custom Component Renderers

Vue.js Custom Component Renderers

While in most web apps you’ll likely be rendering to the DOM, there are a few special cases where you might want to use Vue for something else. Say you’re developing an app with WebGL and you’d like to describe it with Vue as a tree of components. While ... more


Tuesday, 7 March, 2017 UTC

End-to-End Testing Vue.js Apps with TestCafe

End-to-End Testing Vue.js Apps with TestCafe

End-to-end testing is one of the most valuable tools in your testing arsenal, allowing you to simulate what your user would do as they move through your app and determine if your app is responding correctly to that. Unfortunately, it’s also one of the ... more


Monday, 6 March, 2017 UTC

Creating a Custom Loading Screen in Angular

Creating a Custom Loading Screen in Angular

By default Angular apps show a small unstyled Loading… at the top left corner of the browser when first loading and bootstrapping the main app component. We can easily change that default loading indicator to pretty much whatever we want. The following ... more


Sunday, 5 March, 2017 UTC

Vue.js Unit Testing with Karma and Mocha

Vue.js Unit Testing with Karma and Mocha

At some point, any serious development project should implement testing for their components. Generally, the first step is unit testing . Unit testing allows you to ensure that the behavior of your individual components is reliable and consistent. By ... more


Thursday, 2 March, 2017 UTC

Writing Class-Based Components with Vue.js and TypeScript

Writing Class-Based Components with Vue.js and TypeScript

Those from an Angular (2+) background are probably familiar with the pattern of writing components as classes using properties and decorators to describe more complex parts of your component. Well, with a little configuration work, you can do the same ... more


Monday, 27 February, 2017 UTC

Static Type Checking With Flow

Static Type Checking With Flow

A funny thing happens when you mess around with Flow (Facebook’s static type checking library) for a few minutes. JavaScript typing starts to feel simple, useful, and — dare we say? — fun. See for yourself. FWIW, Flow is a fine partner for React, but ... more


Monday, 27 February, 2017 UTC

Upgrading to Vue.js 2.2

Upgrading to Vue.js 2.2

Vue 2.2 was just released with a plethora of neat changes. Here’s a guide to what changed and how it might affect your app, along with migration patterns in the case you relied on something that changed. Vue 2.2 does not introduce any breaking changes ... more


Monday, 27 February, 2017 UTC

Roundup: Vue.js Mobile Hybrid App Frameworks

Roundup: Vue.js Mobile Hybrid App Frameworks

Hybrid mobile apps and progressive web apps are becoming increasingly more common. There are a number of projects that provide a pre-made set of UI Components and APIs to make interaction with your mobile device cleaner and more easily accessible. Here ... more


Friday, 24 February, 2017 UTC

Roundup: Vue.js Desktop Web App Component Libraries

Roundup: Vue.js Desktop Web App Component Libraries

Any good view rendering library should have plenty of third-party components available for developers to work with. Vue is no exception. It has a plethora of amazing component libraries for you to use in whatever projects you see fit. The majority of ... more


Wednesday, 22 February, 2017 UTC

Writing Vue.js Render Functions in JSX

Writing Vue.js Render Functions in JSX

As people from the React world are no-doubt familiar with, render functions are a powerful way to write components for your apps. However, they also come with a hefty price-tag when it comes to readability. Facebook’s solution to this is JSX. JSX is ... more


Sunday, 19 February, 2017 UTC

Vue.js REST API Consumption with Axios

Vue.js REST API Consumption with Axios

Quite a few frameworks have built-in HTTP APIs. Angular 2 has the http module, JQuery has $.ajax , and, up until Vue 2.0 , Vue.js had vue-resource . In Vue 2.0 , the developers decided that having a built-in http client module was rather redundant, and ... more


Friday, 17 February, 2017 UTC

padStart and padEnd String Methods in JavaScript

padStart and padEnd String Methods in JavaScript

padStart and padEnd are two new methods available on JavaScript strings. As their name implies, they allow for formatting a string by adding padding characters at the start or the end. Keep in mind that these two methods are new and browser support is ... more


Thursday, 16 February, 2017 UTC

Model-based Form Validation with Vue.js and Vuelidate

Model-based Form Validation with Vue.js and Vuelidate

While the most beginner-friendly approach to form validation in Vue.js might be through template-based forms, a much more flexible way is to validate the model instead. Model-based validation tends to be easier to understand and change for larger apps, ... more


Thursday, 16 February, 2017 UTC

Introduction to Vue.js Render Functions

Introduction to Vue.js Render Functions

Vue.js templates are incredibly powerful, and can accomplish almost everything you’d ever need in an app. However, there are a few use-cases, often those involving dynamic component creation based on input or slot values that are better served by render ... more


Monday, 13 February, 2017 UTC

Working With Types Using React.PropType

Working With Types Using React.PropType

As compilation (er…transpilation) becomes the defacto standard of the post ES5, JSX-leaning JS dev landscape—care of tools like Babel—there is a growing sentiment that it may be time to let go of our fair language’s dynamic and coercive ways in favor ... more


Sunday, 12 February, 2017 UTC

Understanding Vue.js Lifecycle Hooks

Understanding Vue.js Lifecycle Hooks

Lifecycle hooks are an important part of any serious component. You often need to know when your component is created, added to the DOM, updated, or destroyed. Lifecycle hooks are a window into how the library you’re using works behind-the-scenes, and ... more


Thursday, 9 February, 2017 UTC

Scoped Component Slots in Vue.js

Scoped Component Slots in Vue.js

While basic component slots are all fine and dandy, sometimes you want the template inside the slot to be able to access data from the child component hosting the slot content. For example, if you’re trying to allow custom templates in a container while ... more


Wednesday, 8 February, 2017 UTC

Roundup: Vue.js State Management Libraries

Roundup: Vue.js State Management Libraries

State management has been a hot topic in the rapidly changing front-end web development world for a couple years now. For good reason. Maintaining consistent state is often more difficult that one would expect, but is absolutely crucial. Thankfully there ... more


Tuesday, 7 February, 2017 UTC

Tagged Template Literals With ES6 / ES2015

Tagged Template Literals With ES6 / ES2015

We briefly covered template literals, but they have an extra feature that we didn’t discuss: tags. You can tag your template literals with a function that will be called and can act as a kind of preprocessor on the content of the template literal. Here’s ... more


Sunday, 5 February, 2017 UTC

Understanding Component Slots with Vue.js

Understanding Component Slots with Vue.js

Oftentimes you will need to allow your parent Vue components to embed arbitrary content inside of child components. (Angular devs, you know this as transclusion or content projection.) Vue provides an easy way to do this via slots . Basic Usage To allow ... more


Saturday, 4 February, 2017 UTC

Introduction to Enums in TypeScript

Introduction to Enums in TypeScript

Enums are a TypeScipt data type that allow the organization of number-based collections of unique identifiers. Here’s how to define a simple enum: enum Transport { train, bus, bike, car } let myTransport = Transport.bus; console.log(myTransport); // ... more


Thursday, 2 February, 2017 UTC

Throttling and Debouncing Events with Vue.js and lodash

Throttling and Debouncing Events with Vue.js and lodash

Event throttling and debouncing are great ways to improve performance or lower network overhead. While Vue.js 1 used to have native support for throttling and debouncing events, it was removed in Vue 2 in the interest of keeping the core slim. As a result, ... more


Thursday, 2 February, 2017 UTC

JSON.parse() and JSON.stringify()

JSON.parse() and JSON.stringify()

The JSON object, available in all modern browsers, has two very useful methods to deal with JSON-formatted content: parse and stringify . JSON.parse() takes a JSON string and transforms it into a JavaScript object. JSON.stringify() takes a JavaScript ... more


Tuesday, 31 January, 2017 UTC

Using Asynchronous Computed Properties in Vue.js

Using Asynchronous Computed Properties in Vue.js

Computed properties in Vue are great. They let you perform complex operations or data formatting while maximizing performance with dependency calculations that only update the view when a dependency changes. But alas, they are entirely synchronous. Thankfully, ... more


Monday, 30 January, 2017 UTC

Vue.js Property Validation

Vue.js Property Validation

While Vue makes it easy to add properties to your component, sometimes you need a little more control over what kinds of things are allowed into it. Thankfully, Vue provides built-in ways to add type checking, validation, default values, and constraints ... more


Friday, 27 January, 2017 UTC

Template-Based Form Validation With Vue.js and vee-validate

Template-Based Form Validation With Vue.js and vee-validate

Client-side form validation is a must-have if you want to give users a good idea of what form input they should be entering and avoid accidental typos. One of the simplest ways to do so is with template-based validation. This allows you to validate your ... more


Wednesday, 25 January, 2017 UTC

Component Properties With Vue.js

Component Properties With Vue.js

When creating components with Vue.js, you’ll quickly find that components, even in a parent-child hierarchy don’t know anything about the parent or child. When you want to pass data to a child component, you use props. Props are a simple way of passing ... more


Wednesday, 25 January, 2017 UTC

Creating an Intro Slider for Your Ionic 2 App

Creating an Intro Slider for Your Ionic 2 App

The ion-slides component available with Ionic 2 makes it easy to create an intro slider for your app. This can be used as a quick tutorial on how to use the app or a showcase of the features. Implementing the intro slider is very straightforward, with ... more


Monday, 23 January, 2017 UTC

Lifecycle Hooks in Angular

Lifecycle Hooks in Angular

Angular gives us 8 hooks to allow us to tap into the lifecycle of our components and trigger actions at specific points in the lifecycle. This post discusses lifecycle hooks in Angular 2 and up. Here are the lifecycle hooks available, in the order in ... more


Monday, 23 January, 2017 UTC

Managing Vue.js State with Vuex

Managing Vue.js State with Vuex

If you’ve done any serious development of large-scale single page apps, you’re probably familiar with the concept of state management, particularly the Flux architecture, popularized by Facebook through Redux. Here we’ll show you how to implement such ... more