
<div class="example-hello-world-code">
{% highlight scala %}
import scala.scalajs.js.JSApp
import outwatch.dom._

object HelloWorld extends JSApp {
  def main() = {
    val names = createStringSink()
    
    val node = div(
      input(placeholder := "Name", inputString --> names),
      hr(),
      h2("Hello ", child <-- names)
    )

    OutWatch.render("#app", node)
  }
}
{% endhighlight %}
</div>
<div class="example-hello-world-container">
  <div id="app" ></div>
</div>



<div class="example-hello-world-code">
{% highlight scala %}
import scala.scalajs.js.JSApp
import outwatch.dom._

object HelloWorld extends JSApp {
  def main() = {
    val names = createStringHandler()
    
    val node = div(
      input(placeholder := "Name", inputString --> names),
      hr(),
      h2("Hello ", child <-- names)
    )

    OutWatch.render("#app", node)
  }
}
{% endhighlight %}
</div>
<div class="example-hello-world-container">
  <div id="app" ></div>
</div>


Update example to newest api
Update example to newest api