I am new to JavaScript but I started a course for building react native applications, my problem was understanding this expression in redux export default connect(mapStateToProps)(ComponentName);
I'm just having trouble understanding this expression functionName(params)(classname)
. What does this expression exactly means as of syntax (I'm not trying to understand the redux side of this) and how to use it?
答案 0 :(得分:2)
Seem like functionName(params)
returns a closure or another function which gets called directly, passing it the classname
variable.