home
  • Blog
1.10
  • Getting Started
  • Getting Ember
  • Concepts
  • The Object Model
    • Classes and Instances
    • Computed Properties
    • Computed Properties and Aggregate Data with @each
    • Observers
    • Bindings
    • Reopening Classes and Instances
    • Bindings, Observers, Computed Properties: What Do I Use When?
  • Application
  • Templates
  • Routing
  • Components
  • Controllers
  • Models
  • Views
  • Enumerables
  • Testing
  • Configuring Ember.js
  • Cookbook
  • Understanding Ember.js
  • Contributing to Ember.js
Old Guides - You are viewing the guides for Ember v1.10.0.
Go to v5.0.0

Bindings, Observers, Computed Properties: What Do I Use When?

Edit pencil

Sometimes new users are confused about when to use computed properties, bindings and observers. Here are some guidelines to help:

  1. Use computed properties to build a new property by synthesizing other properties. Computed properties should not contain application behavior, and should generally not cause any side-effects when called. Except in rare cases, multiple calls to the same computed property should always return the same value (unless the properties it depends on have changed, of course.)

  2. Observers should contain behavior that reacts to changes in another property. Observers are especially useful when you need to perform some behavior after a binding has finished synchronizing.

  3. Bindings are most often used to ensure objects in two different layers are always in sync. For example, you bind your views to your controller using Handlebars.

left arrow
Reopening Classes and Instances
We've finished covering The Object Model. Next up: Application - Introduction
right arrow
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2023 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue