Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

参数传值是怎么运作的? #43

Closed
youngList opened this issue Apr 17, 2018 · 1 comment
Closed

参数传值是怎么运作的? #43

youngList opened this issue Apr 17, 2018 · 1 comment

Comments

@youngList
Copy link

1、this.props.dispatch(fetchLogin(value,(res)=>{..},(res)=>{..));
2、export const fetchLogin = createAjaxAction(common.login);
3、export const createAjaxAction=(httpHandle,startAction,endAction)=>(resData,cb,reject,handleCancel)=>(dispatch)=>{...}
4、export const login = ajax.fetchJSONByPost('/login'); //commom目录下的
5、const fetchJSONByPost = (url, target) => (reqData, handleCancel) => axiosPost(url, reqData, target, handleCancel)
这条逻辑链上value是怎么传递的??

@youngList
Copy link
Author

明白了,代码得倒着看。。。外加函数式编程

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant