Skip to content

Commit

Permalink
added ES6 arrow function example
Browse files Browse the repository at this point in the history
  • Loading branch information
Granze committed Feb 20, 2015
1 parent 1084e11 commit 3ff96c1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/components/mycomponent.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
'use strict';

var React = require('react'),
pack = require('../../package.json'),

Mycomponent = React.createClass({
render: function() {
var version = pack.version,
deps;

deps = Object.keys(pack.devDependencies).map((dep, i) => <li key={i}>{dep}</li>);

return (
<h1 className="Mycomponent">Welcome to React Starterify</h1>
<div>
<h1 className="Mycomponent">Welcome to &#9883; React Starterify {version}</h1>
<p>Powered by:</p>
<ul>
{deps}
</ul>
</div>
)
}
});
Expand Down

0 comments on commit 3ff96c1

Please sign in to comment.