Skip to content

Commit 500be81

Browse files
committed
Update README.md
1 parent c44b2c7 commit 500be81

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,23 @@ function fetchUser(id) {
300300
}
301301
```
302302

303+
To pass multiple things, just wrap them in a single object and use destructuring:
304+
305+
```js
306+
```js
307+
const store = createStore(
308+
reducer,
309+
applyMiddleware(thunk.withExtraArgument({ api, whatever }))
310+
)
311+
312+
// later
313+
function fetchUser(id) {
314+
return (dispatch, getState, { api, whatever }) => {
315+
// you can use api and something else here here
316+
}
317+
}
318+
```
319+
303320

304321
## License
305322

0 commit comments

Comments
 (0)