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)

ACI image

ACI.dev: Fully Open-source AI Agent Tool-Use Infra (Composio Alternative)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Check out our GitHub!