Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8426925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:39:40+00:00 2026-06-10T04:39:40+00:00

I’ve been using Knockout.js quite extensively but there’s one pattern I use a lot

  • 0

I’ve been using Knockout.js quite extensively but there’s one pattern I use a lot where I’d like to understand how it actually works.

Often I’ll have an ObservableArray of some view model, such as productModule.products(). Then I’ll have various filter functions such as productModule.getAvailableProducts() which uses an array filter (I currently use Underscore.js) to return a subset, and that function is what gets bound to the UI. What I don’t quite understand is how, given that these functions return a standard array rather than an ObservableArray, that Knockout’s bindings still update when I change the underlying ObservableArray. Here’s an example fiddle:

http://jsfiddle.net/4RHks/19/

Does Knockout determine at binding time whether a particular binding resolves to an ObservableArray even if via other functions? If so, can there be an arbitrary number of such functions in the chain?

Any help in understanding this is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:39:42+00:00Added an answer on June 10, 2026 at 4:39 am

    Bindings are actually executed within a computed observable that is used to track dependencies. So, if you call a function that accesses observables, then they will contribute to the dependencies of that element’s bindings. When the dependency changes, then the binding s will run again.

    This post goes into a little bit more detail: http://www.knockmeout.net/2012/06/knockoutjs-performance-gotcha-3-all-bindings.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ve been using hxt with no problem, but there was a problem since
I've started looking into using Knockout for my team's use; I've been very pleased
I been using .htaccess to change php to html and it works great, but
Been using Django for < 1yr now, but this one is new-to-me. Hopefully someone?
Ive been using this code to make use of the indexedDB api. Works fine
I've been using knockout for a while, but in writing up some code examples
Been using XML for ages now for data storage & transfer, but have never
I been using VS2008 Pro for a long time now but since of licensing
I have been using TortoiseSVN for some time and I really like it. I
I've been using this script for a long time and it works perfectly in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.