[英]What does following statement does in js
I am new to JS with react+redux framework and I have a code that as follows in reducer code. 我是使用react + redux框架刚接触JS的人,并且在reducer代码中有以下代码。
export const operationState = (state = someState, action = {}) => {
//some case handler
}
Please help me in understanding what will this translates to. 请帮助我理解这将意味着什么。
它导出一个带有参数state和action的名为operationState
的函数,如果您在调用operationState()
时未传递任何内容,则默认为someState
和{}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.