Auto Added by WPeMatico

How I deployed My Vue SPA on Heroku

Photo by Kurt Cotoaga on UnsplashIt was an exceeding finger aching day for me today when I tried deploying my Vue.js app on Heroku. After trying some “known” methods that were in articles and docs, I finally was able to do get it deployed! (With some tweaking on my end though 😏). So let’s see how I did it.Psst: I am assuming you’ve already got a VueJS app and created an Heroku app either via CLI…

Continue Reading

How to get the part of a string in JavaScript

part of a string in JavaScriptSubstring method helps us to get a particular part of the string by using the startindex and end index.Substring method accepts two arguments.const name = "jshype" console.log(name.substring(0,2));// output → “js”console.log(name.substring(1,4)); //output--> "shy"start index: In the first argument, we need to specify the start index.end index: In the second argument, we need to specify the end index (end index is not included in the output).const name = "jshype"console.log(name.substring(2))// output--> "hype"If we specify only single…

Continue Reading

HTML Injection Protection With TLX

With TLX v1.0.6, the small (3.5K minified and gzipped), multi-paradigm front-end library you can now automatically protect your templated HTML/JavaScript from injection attacks.If a user tries to enter a JavaScript function as a first name, the code below will automatically reject it and set the field state to invalid.Hello ${firstName}First Name: If you have a style set for invalid fields, then the display of the field will be changed accordingly, e.g. input:invalid { box-shadow: 0…

Continue Reading

How to use modulus(%) operator in javascript

modulus(%) operator in javascriptModulus operator helps us to find the remainder of the two numbers.suppose we have two numbers 5 and 2 where number 1 is dividend and number2 is a divisor ( number1 % number 2 = Remainder) 5 % 2 = 3 // 3 is remainder // 5 mod 2 = 3 10 % 2 = 0 //0 is remainder// 10 mod 2 = 09 % 3 = 0 // 0 is remainderBy…

Continue Reading

How to clear an array in javascript

javascript clear arrayIn this tutorial, we are going to learn different approaches to clear the array in javascript.First wayvar arr = [1,2,3,4,5,6] arr = [ ]console.log(arr)//empty array [ ] In the above example, we updated arr withthe new empty array.Second wayvar arr = [1,2,3,4,5,6]arr.length = 0console.log(arr)//empty array [ ]In the above code, we updated the length of the array to 0. so that it becomes empty and it takes more time compared to the first way.Third wayvar…

Continue Reading

How to use splice and slice methods in javascript

How to use splice and slice methods in javascriptSplice methodsplice method helps us to remove the elements from the existing array and also insert the new elements in the place of removed elements.splice method takes three arguments.start: In which index we need to start removing elements from the array.deleteCount: how many elements we need to remove from the array.item1, item2(optional): insert the new elements in the place of removed elements. (if you don’t specify new elements…

Continue Reading

How this keyword work in javascript

this keyword javascriptIn this tutorial, we are going to learn how this keyword works in javascript at end of this tutorial you will have confidence about how it works.Let’s get started.What is an Execution context?The execution context is specific to the device where it keeps track the runtime evaluation of the code you are running at any point of time there is most one execution context that actually executing the code.Lexical environmentDefinition from the Ecma specificationA Lexical…

Continue Reading

Combining Vue, TypeScript and RxJS with Vue-Rx

At the moment I am writing this article, there are many ways to solve a specific problem.With this article, I’d like to give you an inspiration that might change the current approach you are using in your applications.RxJS might be associated with something like really complex to implement, test and maintain.What if I would tell you that it’s actually really easy to integrate, implement and test even in a generic (small, medium, big) VueJS…

Continue Reading

Mastering Charts in VueJS

For this article, we are going to assume you have some background in Vue.js. If you do not run through some of my previous tutorials here.Let’s start with a clean Vue app using the CLI.$ vue init webpack mastering-charts-vueOnce you set up your app (the default values are fine) you will need to install the v-charts-plugin NPM module. This is a D3.js based charting library that can be used to create a variety of different…

Continue Reading

How to Learn Vue.js in 2018

Vue.js is one of the hottest topics in the web frontend space.Vue has skyrocketed past React to become the most starred JavaScript framework on Github.It was also the framework that the most JavaScript developers said they wanted to learn in 2018.The big question is: How do you learn Vue.js?What are the best resources? What sources should you be reading, what classes should you be taking, and more?Learning ApproachBefore jumping deeply into the available resources, let’s talk briefly about how…

Continue Reading

Vue’s Ecosystem Growth is Taking Off… Just Like React’s Did

JavaScript framework popularity goes in cycles.The current dominant web framework is React, with a huge debate among web developers whether it is going to remain dominant going forward.There have been arguments that React may be different than previous frameworks, and achieve everlasting dominance in the ecosystem.There have also been signs that other frameworks, and particularly Vue.js, may be able to dislodge or at least join React in being dominant in terms of use.These arguments are important, because…

Continue Reading

You may not need Vue’s transition component for animation

Vue.js 2 animationAs of time of writing, I’m using Vue 2.5.xIf you work with Styled components, this article is for you. Else, if at some stage you do learn its benefit you can bookmark this and come back in future :)You might as well have felt the need to do animation or transition in Vue. This is how Vue recommends doing the same. Toggle hello This is a simple but powerful case. We struggle in general with…

Continue Reading

JavaScript News and Updates (September 2018)

Summer’s gone, and it’s a sad fact. To cheer you up a little, we’d like to entertain you with our monthly JavaScript news bulletin. Of course, it won’t replace the bright sun and hot beach, but it’s still something. This time we’d like to tell you about a new ReactJS Map Component, and the updated version of dhtmlxVault, a JavaScript file uploader. Also, we’ll discuss how you can track the state of Agile sprints…

Continue Reading

7 Frontend Architecture Lessons From Nuxt.js

Front-end architecture is a hot topic, and for good reason.As more and more logic has moved into JavaScript on the front-end, applications have become cumbersome to deal with.This has in turn led to the rise of frameworks and application patterns to manage that complexity.While there is no single right choice to architecture, there are a number of patterns that have begun to emerge.These are often encapsulated in starter templates or even full-on application frameworks.One such application framework…

Continue Reading

How To Create An RPG Adventure Game using Vue.JS and Cosmic JS

Cosmic JS is a great content management tool which gives you the ability to upload, access, and edit your data and media files easily. These properties make it a prime candidate to use when building web-based video games as they heavily incorporate a large combination of media images, files, and data objects. In this tutorial, we’ll go over how to make a simple role-playing adventure game built in Vue.JS whilst using Cosmic JS to…

Continue Reading

Framework-agnostic real-time CRUD libraries with Vue sample app

Three years ago, I released an open source boilerplate application as a proof of concept to demonstrate an approach to build real-time CRUD applications using RethinkDB, SocketCluster and Google’s Polymer framework. Although it received a lot of attention initially, that approach did not see any serious adoption and so I stopped thinking about it for a while.Recently, though, I’ve been feeling frustrated by the direction of progress in front end development and so I decided…

Continue Reading

Vue.js SEO-Friendly SPAs: Tips, Tools & Prerender Example

Photo by Steven Lelham on UnsplashDo you know about Hulu's JavaScript fail story?Back in 2016, the online video streaming service experienced a 56% visibility drop due to bad JS handling.A nightmare no business wants to go through.To avoid such disasters, you have to know what you're doing when working with modern JavaScript frameworks.Here at Snipcart, we love Vue.js, but are entirely aware of the SEO issues with a Vue.js singe-page application.In this post, I want to show…

Continue Reading

Essential Guide to Improve SEO in Single Page Application Vue.js

Optimizing your single page application Vue.js for search engines (SEO) is not a simple task, in this short guide you will have an overview of tools and libs Vue.js that will help you to have a better result + several good practice tips in SPAs.SEO (Search Engine Optimization) are practices to be followed to optimize your site for search engines, improving its ranking, bringing better quality and increased traffic, thereby generating much more visibility for…

Continue Reading

React VS Vue

We’ve been developing mobile apps for more than two years. During this time we have gained priceless experience and we want to share it with you. We already compared React and Angular so today we’ll have a look at React and Vue. The differences in work will be presented and explained by our tech director/team lead and etc. Here are the six cards.Summing upWe recommend React to work on big and small apps development.Written by…

Continue Reading

QuickStart a Vue.js RPG Game in 3 Steps

Cosmic JS makes it easy to manage content for your Vue.js applications. In this blog we’ll quickstart a Vue.js RPG Adventure Game using the Cosmic CLI. Our game, “Enter The Cosmos”, is a turn-based, RPG style game built using Vue.js, Node.js and Cosmic JS. The game follows you as you fight off a fleet of space pirates to avenge your family. Install, deploy and edit every part of this video game app from your…

Continue Reading
Close Menu
Skip to toolbar