Skip to content

Commit

Permalink
Remove unnecessary redux helper
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Nov 23, 2017
1 parent 67095eb commit 66590ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import reduce from '../reducers';
import * as actions from '../actions';
import TodoItem from './todo-item';

@connect(reduce, { ...actions })
@connect(reduce, actions)
export default class App extends Component {
addTodos = () => {
const { text } = this.state;
this.props.addTodo(this.state.text);
this.setState({ text: '' });
this.props.addTodo(text);
return false;
};

removeTodo = (todo) => {
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 @@ -13,7 +13,7 @@ export default class TodoItem extends Component {
render({ todo }) {
return (
<li>
<button onClick={this.remove}>&times;</button>
<button onClick={this.remove}>×</button>
{ ' ' + todo.text }
</li>
);
Expand Down

0 comments on commit 66590ec

Please sign in to comment.