DEV Community

Syntax - Tasty Web Development Treats

The VueJS Show (Scott teaches Wes)

In this episode Wes and Scott talk about VueJS - what it is, how it compares to other frontend frameworks, and how to get the most out of it.

Sentry - Sponsor

If you want to know what’s happening with your errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry.io and using the coupon code “tastytreat”.

Clubhouse - Sponsor

Clubhouse is the first project management software that brings everyone together so that teams can focus on what matters: creating products that customers love. Clubhouse provides a perfect balance of simplicity and structure for better cross-functional collaboration. Check out https://clubhouse.io/syntaxpodcast and get your first two months free.

Show Notes

2:22 - What’s the deal with VueJS?

  • Combines ideas from Angular 1, React and Blaze
  • Ease of Angular 1
  • App structure of React

8:02 - Components

  • Template syntax is similar to handlebars

    • aka {{stuff}}
  • v-bind:property

    • v-bind:property or simply :bind allows you to dynamically bind a value to a property
  • Props

    • Props must be declared before they can be used in a template.
  • Script tag

    • Where imports happen
    • Where props are defined, computed properties, action events and lifecycle
  • Actions

    • v-on:click="doSomething"
    • @click="doSomething"
    • These will run a doSomething event defined in your script export via methods
  • Lifecycle

    • How does data fetching work?
  • CSS

    • Can be scoped to file by adding  to your property
  • Global Registration

    • You can register a global component and not have to import it

36:38 - Features

  • CLI

    • Easy to use when creating new projects
  • Animations

    • Baked in to core
    • A transition component wraps your code and just have a v-if on the element you are transitioning
    • There is also more intense javascript options via v-on
  • Routing

    • 1st party router vue-router with support for 3rd party routers
  • Global State

    • Vuex

45:57 - Ecosystem

  • Nuxt — AKA Next.js for Vue
  • Gridsome — AKA Gatsby for Vue
  • Native?
Links ××× SIIIIICK ××× PIIIICKS ××× Shameless Plugs Tweet us your tasty treats!

Episode source