News for hackers. Stuff that matters.
Re:React, a JavaScript library for building user interfaces by tomjakubowski on Wednesday May 29, 2013 @05:40PM (#5789326)
First impression is that this is a lot like their PHP language extension XHP[1], which allows you to embed XML syntax into PHP and automatically escapes variables depending on their context (inside or outside the XML):

  <?php
  // note: includes omitted
  if ($_POST['name']) {
    echo <span>Hello, {$_POST['name']}</span>;
  } else {
    echo
      <form method="post">
        What is your name?<br />
        <input type="text" name="name" />
        <input type="submit" />
      </form>;
  }
in that snippet, the $_POST variable is correctly escaped to mitigate XSS attacks. XHP also allows you to condense complex components into a single tag.

1: https://www.facebook.com/note.php?note_id=294003943919

Re:React, a JavaScript library for building user interfaces by phibit on Thursday May 30, 2013 @01:34AM (#5791099)
Maybe you're just talking about the JSX component? React uses JSX (optionally, they say) but they serve different purposes.
Re:React, a JavaScript library for building user interfaces by csears on Thursday May 30, 2013 @12:50PM (#5793598)
I can see how embedding XML could be useful, but it's hard for my brain to parse. It keeps telling me some quotes missing somewhere. Maybe I'm just being anti-XML, but I don't see this getting much traction.