JSFiddle - React, Tailwind, and code Playground

HTML

<figure class="code">
    <figcaption><strong>Listing 5</strong> ActionScript binding using ChangeWatcher</figcaption>
                    
<pre class="prettyprint linenums">
<code>&lt;?xml version="1.0" encoding="utf-8"?>
&lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               applicationComplete="init()">
    &lt;s:layout>
      &lt;s:VerticalLayout/>
    &lt;/s:layout>
    &lt;fx:Script>
   &lt;![CDATA[
                  import mx.events.PropertyChangeEvent; <mark data-cueId="5-A">A</mark>
                  import mx.binding.utils.ChangeWatcher; <mark data-cueId="5-A">A</mark>
 
                 protected var _watcher:ChangeWatcher;
 
           protected function init():void{
       toggleWatch();
     }
                 protected function toggleWatch():void{
               if(_watcher && _watcher.isWatching()){ <mark data-cueId="5-C">C</mark>
        _watcher.unwatch(); <mark data-cueId="5-D">D</mark>
        toggleButton.label = "Watch"; <mark data-cueId="5-E">E</mark>
       }else{
        _watcher = ChangeWatcher.watch(inputField,"text",onTextChange); <mark data-cueId="5-B">B</mark>
        toggleButton.label = "Stop Watching";
       }
    }
         protected function onTextChange(event:Event):void{
           myLabel.text = inputField.text;
   }
 ]]>
  &lt;/fx:Script>
  &lt;s:Button id="toggleButton" label="Watch Text" click="toggleWatch()"/>
  &lt;s:TextInput id="inputField" text="start text"/>
  &lt;s:Label id="myLabel" />
&lt;/s:Application></code>
</pre>
    <ul class="annotations">
        <li data-aId="5-A">Necessary imports to dynamically bind variables</li>
        <li data-aId="5-B">Tells ChangeWatcher to detect changes</li>
        <li data-aId="5-C">Checks list of watched variables</li>
        <li data-aId="5-D">Removes watched variable</li>
        <li data-aId="5-E">Yeah, I'm just making this up.</li>
    </ul>
</figure>