Skip to content

Commit 081d65a

Browse files
committed
Merge pull request #3 from gaearon/patch-1
Use modern applyMiddleware() API
2 parents d946717 + 2165582 commit 081d65a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Takes a single argument, an optional callback that will be called if an action i
1212

1313
### Use
1414
```js
15-
import {createStore, applyMiddleware } from "redux";
15+
import { createStore, applyMiddleware } from "redux";
1616
import reduxUnhandledAction from "redux-unhandled-action";
1717
import reducer from "./reducer";
1818
const callback = (action) => console.error(`${action} didn't lead to creation of a new state object`);
19-
const store = applyMiddleware(reduxUnhandledAction(callback))(createStore);
19+
const store = createStore(reducer, applyMiddleware(reduxUnhandledAction(callback)));
2020
```
2121
- - -
2222

@@ -26,4 +26,4 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
2626

2727
http://www.apache.org/licenses/LICENSE-2.0
2828

29-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
29+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0 commit comments

Comments
 (0)