Skip to content
Permalink
Browse files

Setup State

  • Loading branch information...
nathanheffley committed Nov 2, 2017
1 parent f853374 commit 6496fb2ee5f904488ac25074f2925af2d8ceb380
Showing with 15 additions and 3 deletions.
  1. +7 −2 public/js/app.js
  2. +8 −1 resources/assets/js/components/Counter.js
function Counter() {
_classCallCheck(this, Counter);

return _possibleConstructorReturn(this, (Counter.__proto__ || Object.getPrototypeOf(Counter)).apply(this, arguments));
var _this = _possibleConstructorReturn(this, (Counter.__proto__ || Object.getPrototypeOf(Counter)).call(this));

_this.state = {
count: 0
};
return _this;
}

_createClass(Counter, [{
__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
'p',
null,
'Counter Component'
this.state.count
)
);
}
@@ -2,10 +2,17 @@ import React, { Component } from 'react';
import ReactDOM from 'react-dom';

export default class Counter extends Component {
constructor() {
super();
this.state = {
count: 0
};
}

render() {
return (
<div className="container">
<p>Counter Component</p>
<p>{ this.state.count }</p>
</div>
);
}

0 comments on commit 6496fb2

Please sign in to comment.
You can’t perform that action at this time.