Skip to content

Commit

Permalink
Use property initialiazers for initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
nattatorn-dev committed Nov 7, 2017
1 parent f91ba52 commit e55a82a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ import DockOffset from "./dock-offset";
export default class extends React.Component {
static Item = DockItem;

constructor(props) {
super(props);

this.state = { magnifierX: null, };
}

state = { magnifierX: null };

render() {
let offsetLeft = this.state.magnifierX === null ? this.unmagnifiedDockOffsetLeft : this.magnifiedDockOffsetLeft;
let offsetRight = this.state.magnifierX === null ? this.unmagnifiedDockOffsetRight : this.magnifiedDockOffsetRight;
Expand Down

0 comments on commit e55a82a

Please sign in to comment.