Skip to content

Commit

Permalink
Merge pull request #5 from abhishekisnot/master
Browse files Browse the repository at this point in the history
(chore) add to gitignore and fix few formattings
  • Loading branch information
developit authored Nov 22, 2016
2 parents 2f79171 + be7cf32 commit 52bf2c0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/npm-debug.log
/build
.DS_Store
.idea
5 changes: 2 additions & 3 deletions src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import reduce from '../reducers';
import * as actions from '../actions';
import TodoItem from './todo-item';


@connect(reduce, bindActions(actions))
export default class App extends Component {
addTodos = () => {
let { text } = this.state;
this.setState({ text:'' });
this.setState({ text: '' });
this.props.addTodo(text);
return false;
};
Expand All @@ -26,7 +25,7 @@ export default class App extends Component {
<input value={text} onInput={this.linkState('text')} placeholder="New ToDo..." />
</form>
<ul>
{ todos.map( todo => (
{ todos.map(todo => (
<TodoItem key={todo.id} todo={todo} onRemove={this.removeTodo} />
)) }
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/todo-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { h, Component } from 'preact';

export default class TodoItem extends Component {
shouldComponentUpdate({ todo, onRemove }) {
return todo!==this.props.todo || onRemove!==this.props.onRemove;
return todo !== this.props.todo || onRemove !== this.props.onRemove;
}

remove = () => {
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ module.exports = {
'process.env.NODE_ENV': JSON.stringify(ENV)
}),
new HtmlWebpackPlugin()
]).concat(ENV==='production' ? [
]).concat(ENV === 'production' ? [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin()
] : []),

stats: { colors: true },

devtool: ENV==='production' ? 'source-map' : 'inline-source-map',
devtool: ENV === 'production' ? 'source-map' : 'inline-source-map',

devServer: {
port: process.env.PORT || 8080,
Expand Down

0 comments on commit 52bf2c0

Please sign in to comment.