From 433a59dba22037d219882bbbfea29ebbc3e95055 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Fri, 20 May 2016 17:38:27 +0200 Subject: [PATCH] use pure function instead of creating class --- j/jsx.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/j/jsx.js b/j/jsx.js index 76f21413..ed3f9a5a 100644 --- a/j/jsx.js +++ b/j/jsx.js @@ -1,12 +1,8 @@ var React = require('react'); -var HelloWorld = React.createClass({ - displayName: 'HelloWorld', - render: function() { - return ( - Hello World - ); - } -}); +var HelloWorld = function() { + return Hello World; +}; +HelloWorld.displayName = 'HelloWorld'; console.log(React.renderToString());