官术网_书友最值得收藏!

  • Redux Quick Start Guide
  • James Lee Tao Wei Suresh Kumar Mukhiya
  • 120字
  • 2021-07-02 12:40:29

Compositions

A composition is a very important concept of functional programming; it is how we create a higher-order function by consuming and combining simpler functions.

Let's just use the sum function that we defined previously. We can split the sum function into the following composition:

const sum = a => b => a + b
sum(2)(5)

Any function can be transformed into a composable function via the concept of currying. Explaining these fundamental functional concepts is beyond the scope of this book, and we suggest that you get familiar with functional terms as much as possible, in order to get a full understanding of Redux and React. We will consume a composition function from Redux, called compose, in upcoming chapters.

主站蜘蛛池模板: 五河县| 涞水县| 咸宁市| 特克斯县| 新建县| 和平县| 长兴县| 社旗县| 连平县| 九江市| 大田县| 呼玛县| 育儿| 沁源县| 额尔古纳市| 惠东县| 新建县| 方山县| 永登县| 海南省| 锦州市| 比如县| 枣阳市| 正定县| 贵定县| 灵璧县| 青河县| 会东县| 龙海市| 阿坝| 长岛县| 永宁县| 烟台市| 石阡县| 宽甸| 虞城县| 留坝县| 宁安市| 威远县| 吐鲁番市| 清徐县|