 
       # We on purpose do not reuse helpers, events, and hooks. Templates are used only for HTML rendering.
 
+      @component._componentInternals ?= {}
+
       registerHooks template,
         onCreated: ->
           # @ is a template instance.

    # and this is this dependency mixin, the view might already be created or rendered and callbacks were
    # already called, so we should call them manually here as well. But only if he view has not been destroyed
    # already. For those mixins we do not call anything, there is little use for them now.
    unless @templateInstance?.view.isDestroyed
      mixinInstance.onCreated?() if not @_componentInternals.inOnCreated and @templateInstance?.view.isCreated
      mixinInstance.onRendered?() if not @_componentInternals.inOnRendered and @templateInstance?.view.isRendered

    # To allow chaining.
    @

    while component.mixinParent()
      component = component.mixinParent()

    Blaze.getData(component._componentInternals.templateInstance.view) or null

  # Caller-level data context. Reactive. Use this to get in event handlers the data
  # context at the place where event originated (target context). In template helpers
