title: How to get component instance in data section in vuejs template?
body: <p>I have a component that has complex rendering logic.
  I try to carry out this logic to helper classes, for simplifying.
  To do this, in the <strong>data</strong> section (for reactivity), I create class references as follows:</p>
  
  <pre><code>export default {
    data: () =&gt; ({
      state: new InitialState(this),
      query: new QueryController(this)
    })
  }
  </code></pre>
  
  <p>As I understand it, at this point the context of <code>this</code> is not yet defined.
  So, I have two questions.</p>
  
  <p>1) Is there a way to pass the <code>this</code> component context in the <strong>data</strong> section (without lifecycle hooks)?</p>
  
  <p>2) Is the approach with references to external classes of vuejs philosophy contrary?</p>