diff --git a/README.md b/README.md index b499ab4..c4b108c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Preact Redux Example -A **10kb** Preact + Redux boilerplate built with [Preact CLI], implementing a To-Do List app. +A **9kb** Preact + Redux boilerplate built with [Preact CLI], implementing a To-Do List app. diff --git a/src/components/app.js b/src/components/app.js index b17039a..c26fbb7 100644 --- a/src/components/app.js +++ b/src/components/app.js @@ -1,11 +1,10 @@ import { h, Component } from 'preact'; import { connect } from 'preact-redux'; -import { bindActions } from '../util'; import reduce from '../reducers'; import * as actions from '../actions'; import TodoItem from './todo-item'; -@connect(reduce, bindActions(actions)) +@connect(reduce, { ...actions }) export default class App extends Component { addTodos = () => { const { text } = this.state; diff --git a/src/util.js b/src/util.js deleted file mode 100644 index 1ebc4d8..0000000 --- a/src/util.js +++ /dev/null @@ -1,7 +0,0 @@ -import { bindActionCreators } from 'redux'; - -export function bindActions(actions) { - return dispatch => ({ - ...bindActionCreators(actions, dispatch) - }); -}