gpt4 book ai didi

javascript - 这段代码是什么意思?是匿名函数吗?

转载 作者:行者123 更新时间:2023-12-02 23:25:08 24 4
gpt4 key购买 nike

我正在使用教科书学习React。书上有一些代码我看不懂。

const loggerMiddleware = store => next => action => {
}

我知道javascript中的匿名函数。

(a, b, c) => {
}

但是,这是什么?

store => next => action => {
}

请帮助我。

最佳答案

这是一个高阶函数,即返回函数的函数。意思是一样的

store => next => {
return action => { }
}

关于javascript - 这段代码是什么意思?是匿名函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56774064/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com