Skip to content

Commit 0e5d228

Browse files
committed
style: fix lint error
1 parent 8c9e5d6 commit 0e5d228

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

ja/Redux/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ export default function createLogger(options = defaultOptions) {
101101
`return`している高階関数の連なりが _Middleware_ の本体となります。
102102

103103
```js
104-
const middleware = store => next => action => {}
104+
const middleware = store => next => action => {};
105105
```
106106

107107
上記のArrowFunctionの連なりが一見すると何をしているのかが分かりにくいですが、
108108
これは下記のように展開することができます。
109109

110110
```js
111111
const middleware = (store) => {
112-
return (next) => {
113-
return (action) => {
114-
// Middlewareの処理
115-
}
116-
}
117-
}
112+
return (next) => {
113+
return (action) => {
114+
// Middlewareの処理
115+
};
116+
};
117+
};
118118
```
119119

120120
ただ単に関数を返す関数(高階関数)を作っているだけだと分かります。
@@ -126,7 +126,6 @@ const middleware = (store) => {
126126
この場合の `next``dispatch` と言い換えても問題ありませんが、複数の _Middleware_ を適応した場合は、
127127
**次の** _Middleware_ を呼び出すという事を表現しています。
128128

129-
130129
## どういう仕組み?
131130

132131
- 高階関数をapplyしている

0 commit comments

Comments
 (0)