「原理是將傳入 function 的參數,利用 closure(閉包)特性,將它們存放在另一個 function 中並當做回傳值,而這些 function 會形成一個鏈(chain),待最後參數傳入,完成運算」這段話沒有錯,用以下的程式碼舉例, store.getState() 便是用了閉包的特性,才可以在 dispatchAndLog() 這個函式中使用。

--

--

--

每天進步一點點,在終點遇見更好的自己。

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Airwaves

Airwaves

每天進步一點點,在終點遇見更好的自己。

More from Medium

Leticia’s Fire & Desire

13 Useful Truths My Younger Self Didn’t Know

GPS Riding CFO attends VivaTech 2022 in Paris

(12/20/21) Respect Your Plan!