code: function () {
                      // Ensure we've got a proper binding context to work with
                      var bindingContext = (dataOrBindingContext && (dataOrBindingContext instanceof ko.bindingContext))
                          ? dataOrBindingContext
                          : new ko.bindingContext(ko.utils.unwrapObservable(dataOrBindingContext));
  
                      // Support selecting template as a function of the data being rendered
                      var templateName = typeof(template) == 'function' ? template(bindingContext['$data']) : template;
  
                      var renderedNodesArray = executeTemplate(targetNodeOrNodeArray, renderMode, templateName, bindingContext, options);
                      if (renderMode == "replaceNode") {
                          targetNodeOrNodeArray = renderedNodesArray;
                          firstTargetNode = getFirstNodeFromPossibleArray(targetNodeOrNodeArray);
                      }
                  }
docs: So the DOM is automatically updated when any dependency changes