summaryrefslogtreecommitdiff
path: root/src/clockView.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/clockView.js')
-rw-r--r--src/clockView.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/clockView.js b/src/clockView.js
new file mode 100644
index 0000000..61a13f4
--- /dev/null
+++ b/src/clockView.js
@@ -0,0 +1,14 @@
+var ClockView = React.createClass({
+ render: function() {
+ return (
+ <p>
+ Hello, <input type="text" placeholder="Your name here" />!
+ It is {this.props.date.toTimeString()}
+ </p>
+ );
+ }
+});
+
+setInterval(function() {
+ ReactDOM.render(<ClockView date={new Date()} />, document.getElementById('clock'));
+}, 500);