       # @ is a template instance.
       @component.onDestroyed()
 
-    template
+    return template unless argumentsProvided
+
+    # Arguments were provided through "args" template helper and passed in as a data
+    # context. Restore original (parent) data context and render the component in it.
+    new Blaze.Template ->
+      Blaze._TemplateWith (-> Template.parentData()), (-> template)
 
   @template: ->
     # You have to override this method with a method which returns a template name or template itself.

      templateBase = componentClassTemplate
      assert templateBase

    # Create a new component template based on the Blaze template. We want our own template
    # because the same Blaze template could be reused between multiple components.
    # TODO: Should we cache these templates based on (componentName, templateBase) pair? We could use tow levels of ES6 Maps, componentName -> templateBase -> template.

    # We on purpose do not reuse helpers, events, and hooks. Templates are used only for HTML rendering.

    template.onCreated ->
      # @ is a template instance.

      @view._onViewRendered =>
        # Attach events the first time template instance renders.
        addEvents @view, @component if @view.renderCount is 1

      @component = component
      @component.templateInstance = @
      @component.onCreated()

