Giter Club home page Giter Club logo

integrating-vuejs-in-multipage-applications's Introduction

integrating-vuejs-in-multipage-applications

Smooth integration of Vue js in multi-page applications which might have used Vanilla JS or Jquery earlier

Why use Vue in place of Vanilla JS ?

  • Simplifies stuff like event handling, data handling, API calls and more
  • Routing can be implemented on the front-end
  • Component based structure encourages modularity in user interface development.
  • Saves lines of code

Data, Events and Filters

To use Vue js in your multi-page application, you need to target the section where you need to use Vue in the Vue instance through class or ID (aiming through ID is preferred). Vue prevents targeting body element of the page.

The about.html page contains examples for event handling through Vue. The section tag is wrapped with a Vue object so that event and data handling can be done through Vue instead of pure Vanilla JS.

Filtering is demonstrated using currency where $ sign is appended before each currency value in the currency array.

Watchers

Watchers are used to keep track of changes in a given variable. For instance, if a boolean variable is monitored through a watcher, then we can hook a function to it which can be executed as soon as the boolean variable is changed.

Animations

There are multiple ways of animating DOM elements in Vue JS.

  • Use conditional classes
  • Use Transition wrapper
  • Animation through Javascript life-cycle hooks

Animating through classes could be the easiest way to animate stuff in Vue JS while using Transitions might be the right way to do it and supports animating multiple elements at once.

Conditional Rendering

Conditional rendering of DOM elements can be controlled using v-if and v-show built in directives in Vue JS.

โœ… Vue JS Resources

This would contain the resources I've went through while learning Vue JS over the years I've been working in Vue JS.

๐Ÿ“š Books

Title Author
Python Hat True

๐Ÿ”ฅ Youtube Channels

Channel Name Owner URL
Python Hat True 23.99

๐ŸŽฅ Udemy Courses

Title Teacher
Vuejs-2-the-complete-guide Maximilian Shwarzmuller
Build-web-apps-with-vuejs-firebase Shaun Pelling
Vuejs-from-beginner-to-professional Bo Andersen

integrating-vuejs-in-multipage-applications's People

Contributors

apfirebolt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.