像这样的func(foo)(bar)调用javascript函数是什么意思

时间:2019-04-18 06:50:08

标签: javascript reactjs react-redux antd

我经常看到用第二对括号调用方法。

例如redux中的connect函数。

connect(
  mapStateToProps,
  mapDispatchToProps
)(TodoItem)

或者来自antd的此功能

const prefixSelector = getFieldDecorator('prefix', {
      initialValue: '86',
    })(
      <Select style={{ width: 70 }}>
        <Option value="86">+86</Option>
        <Option value="87">+87</Option>
      </Select>
    );const prefixSelector = getFieldDecorator('prefix', {
      initialValue: '86',
    })(
      <Select style={{ width: 70 }}>
        <Option value="86">+86</Option>
        <Option value="87">+87</Option>
      </Select>
    );

这里发生了什么?如何称呼这个概念,以便我可以进一步研究它?

0 个答案:

没有答案