Categories: web development

Hello World in React Js

This is hello word app created with react.js This is my first simple script. Yes, I know it’s easier to do this in html. But I wanted to do this in JSX to make thing more complicated.

 

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>Jsx</title>
</head>
<body>
 
 <!-- container node -->
 <div id="jsx">
  
 </div>
 <!-- container node -->
 <div id="dom">
  
 </div>
 <script src="https://fb.me/react-0.11.1.js"></script>
 <script src="https://fb.me/JSXTransformer-0.11.1.js"></script>
 <script type="text/jsx">
 /** @jsx React.DOM */

 var MessageBox = React.createClass({

  render: function(){
   return (
    <div className="container">
    <h1>Hi</h1>
    <SubMessage />
    </div>

    );
  }
 });

 var SubMessage = React.createClass({
  render: function(){
   return (
   <small>Sub message</small>
   );
  }
 });

 var reactComponentJSX = React.renderComponent(
  <MessageBox />,
  document.getElementById('jsx')
  );
 </script>
</body>
</html>
Admin

Share
Published by
Admin

Recent Posts

Unveiling the Intricacies of the Tinder Algorithm: 5 Surprising Metrics

Monitored by Tinder The inner workings of the Tinder algorithm remain shrouded in secrecy, known…

3 weeks ago

Is Shopping Temu Safe

Use fav19073 30% OFF Shop Now I recently had a fantastic buying experience on Temu,…

4 months ago

Cheap Netflix Subscription

Unlocking Affordable Streaming: How Gamsgo.com is Revolutionizing Netflix Subscriptions Sign Up Save1 coupon code for…

4 months ago

Domains for SALE.

razerkeyb.com gloriousmouse.com

9 months ago

How to Start your own vegetable garden?

Planting your own vegetables and fruit is a great way to save money and eat…

1 year ago

Jobs AI can’t replace

While AI has the potential to automate many tasks, there are still some jobs that…

1 year ago