title: On an A-Frame component, how do you share data between functions?
body: <p>I'm making an A-Frame component and I want to share data between functions like <code>init</code> and other custom component handlers.</p>
  
  <p>I figured out how to add to the component schema to allow for input from the DOM to set a variable using <code>this.data</code> following this doc:
  <a href="https://aframe.io/docs/0.4.0/core/component.html#component-prototype-properties" rel="nofollow noreferrer">https://aframe.io/docs/0.4.0/core/component.html#component-prototype-properties</a></p>
  
  <p>However I am having trouble, sometimes the value of <code>this.data</code> reverts back to the initial state from the DOM, not reflecting runtime modifications. Is there a better way to share data across a component?</p>