Skip to content

Commit 1e96b72

Browse files
committed
Published Episode 10
1 parent b464979 commit 1e96b72

27 files changed

+510
-0
lines changed

episode10/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Redux Thunk Tricks
2+
3+
ReactCasts, episode 10.
4+
5+
Redux Thunk is the most used library for side effects and asyncronous calls in Redux - and that's for a reason. But despite being so used, there are a few useful thunk tricks that aren't yet commonplace, so in this episode I'll share some pieces of thunk knowledge that might help you build better applications.
6+
7+
Screencast video:
8+
https://youtu.be/xihoZZU0gao
9+
10+
# Outline
11+
12+
- The first tip is very simple: You can return values from thunks, and this can be useful, for example, for asynchronous orchestration.
13+
14+
- The second tip is about thunk's getState, and how it can be a bad idea to rely on this mechanism for accessing data.
15+
16+
- The third tip is about using thunk withExtraArguments to make your thunks easy to test and run on multiple environments.
17+
18+
19+
# Build & Run Instructions
20+
21+
1. To build and run the code in this directory, ensure you have [npm](https://www.npmjs.com) installed
22+
23+
2. Install
24+
```
25+
npm install
26+
```
27+
28+
3. Start the application
29+
```
30+
npm start
31+
```

episode10/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "bookstore",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"lodash.intersection": "^4.4.0",
7+
"react": "^15.5.4",
8+
"react-dom": "^15.5.4",
9+
"react-redux": "^5.0.4",
10+
"redux": "^3.6.0",
11+
"semantic-ui-react": "^0.68.2"
12+
},
13+
"devDependencies": {
14+
"react-scripts": "0.9.5"
15+
},
16+
"scripts": {
17+
"start": "react-scripts start",
18+
"build": "react-scripts build",
19+
"test": "react-scripts test --env=jsdom",
20+
"eject": "react-scripts eject"
21+
}
22+
}
44.4 KB
Loading
36.7 KB
Loading

episode10/public/books/lotr.jpg

30.9 KB
Loading
46.4 KB
Loading
65.5 KB
Loading

episode10/public/books/readyp1.jpg

57.4 KB
Loading
34.4 KB
Loading

episode10/public/favicon.ico

24.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)