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.

Sonar image

Explore the coding personalities of leading LLMs

Sonar’s new report on leading LLMs explores the critical tradeoffs between performance and security. Explore the distinct coding personalities of models like OpenAI’s GPT-4o and Claude Sonnet 4 to determine the best AI strategy for your team.

Read now

Top comments (0)

Heroku

Tired of jumping between terminals, dashboards, and code?

Check out this demo showcasing how tools like Cursor can connect to Heroku through the MCP, letting you trigger actions like deployments, scaling, or provisioning—all without leaving your editor.

Learn More

👋 Kindness is contagious

Explore this practical breakdown on DEV’s open platform, where developers from every background come together to push boundaries. No matter your experience, your viewpoint enriches the conversation.

Dropping a simple “thank you” or question in the comments goes a long way in supporting authors—your feedback helps ideas evolve.

At DEV, shared discovery drives progress and builds lasting bonds. If this post resonated, a quick nod of appreciation can make all the difference.

Okay