DEV Community

Joe Steinbring
Joe Steinbring

Posted on • Originally published at blog.jws.app on

1

Six ways to use data binding with Vue.js

This is going to be a pretty quick post. This week, I figured that we would look at computed properties and methods.

In the above example, we are taking Date.now() and outputting it to the screen four ways:

    • Directly as {{Date.now()}}
    • As the variable time
    • As a computed value
    • As a method

What is the functional difference between them? In this case, very little. 🙂

So, what if we bind to our component’s data instead of to Date.now()?

So, now the value can actually update? 🙂

Please note, this is a republishing of a post that I wrote early last year, so please don't be too harsh.

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Quickstart image

Django MongoDB Backend Quickstart! A Step-by-Step Tutorial

Get up and running with the new Django MongoDB Backend Python library! This tutorial covers creating a Django application, connecting it to MongoDB Atlas, performing CRUD operations, and configuring the Django admin for MongoDB.

Watch full video →

👋 Kindness is contagious

Please consider leaving a ❤️ or a friendly comment if you found this post helpful!

Okay