title: Why some of the variables are not changed in the nested tag, in RiotJs?
body: <p>I have a simple nested tag:</p>
  
  <pre><code>    &lt;nested-tag&gt;
          &lt;p&gt;myTitle: {myTitle}&lt;/p&gt;
          &lt;p&gt;{myKeyword}&lt;/p&gt;
          this.myTitle = opts.title;
          this.myKeyword = opts.keyword;
      &lt;/nested-tag&gt;
  </code></pre>
  
  <p>You can see I assign the <code>opts.title</code> and <code>keyword</code> to two new variable <code>myTitle</code> and <code>myKeyword</code>. </p>
  
  <p>Then I use it in a loop of a parent tag:</p>
  
  <pre><code>    &lt;my-tag&gt;
          &lt;input type="text" onkeyup={search} value={keyword} /&gt;
  
          &lt;ul&gt;
             &lt;li each={items}&gt;
             &lt;nested-tag title={title} keyword={parent.keyword}&gt;&lt;/nested-tag&gt;
             &lt;/li&gt;
          &lt;/ul&gt;
  
          this.keyword = ""
          var initItems = [{ title:  "aaaa"}, { title: "bbbb"} ]
          this.items = initItems
  
          this.search = function(event) {
            this.keyword = event.target.value;
            this.items = initItems.filter((item) =&gt; item.title.indexOf(this.keyword) &gt;=0 );
          }
      &lt;/my-tag&gt;
  </code></pre>
  
  <p>You can see I passed the <code>parent.keyword</code> to <code>nested-tag</code> as <code>keyword</code> variable.</p>
  
  <p>When I input something to the text input, the <code>keyword</code> will be changed, so the <code>&lt;nested-tag&gt;</code> will be recreated with the new <code>parent.keyword</code>.</p>
  
  <p>But it's not, the <code>{myKeyword}</code> of nested-tag is always empty. I have to rewrite it with directly <code>opts.keyword</code> invocation:</p>
  
  <pre><code>    &lt;nested-tag&gt;
          &lt;p&gt;opts.title&lt;/p&gt;
          &lt;p&gt;opts.keyword&lt;/p&gt;
      &lt;/nested-tag&gt;
  </code></pre>
  
  <p>And it's working well now.</p>
  
  <p>I'm not sure why and how to fix it? Do I have to always use <code>opts.xxx</code> in the nested tags?</p>
  
  <hr>
  
  <p>A live demo is here: </p>
  
  <ul>
  <li><a href="http://jsfiddle.net/3jsay5dq/10/" rel="nofollow noreferrer">http://jsfiddle.net/3jsay5dq/10/</a></li>
  </ul>
  
  <p>you can type something to the text input to see the result</p>