Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.
/ react-dd Public archive

For those who don't use JSX and relied on React.DOM.___ just being function calls

License

Notifications You must be signed in to change notification settings

smallhelm/react-dd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-dd

For those who don't use JSX and relied on React.DOM.___ just being function calls

How to Use It

var dd = require("react-dd");

var Hello = dd.createClass({
  render: function(){
    return dd.h1(null, "Hello " + this.props.name);
  }
});

React.render(Hello({name: "World"}), document.body);

What's wrong with JSX?

JSX: a syntax that feels like HTML, but is actually XML syntax with JavaScript escape sequences. And by the way, you have to compile it to JavaScript before it can be shared with others or executed.

It's hard enough to deal with JavaScript syntax. Why in the world would would we want to mix it in with yet another syntax?

We've all become accustomed to HTML b/c it's what's been handed down and morphed into what it is. But when you think about it, it's a horrible syntax. Let's stop using it!

Other alternatives to JSX

FYI

This project follows semantic versioning for releases.

License

MIT

About

For those who don't use JSX and relied on React.DOM.___ just being function calls

Resources

License

Stars

Watchers

Forks

Packages

No packages published