一,dispatch的使用
1,在src/service/code.js里封装函数接口

2,在src/models/code.js里封装Dva effetcs

3,在src/actions/code.js里调用接口函数

4,在组件里调用接口:connect(注意:组件名要和文件名一致,只有loading为true的时候才开始渲染组件)


1,在src/service/code.js里封装函数接口
2,在src/models/code.js里封装Dva effetcs
4,在组件里调用接口:connect(注意:组件名要和文件名一致,只有loading为true的时候才开始渲染组件)
本文标题:react难点
本文链接:https://www.haomeiwen.com/subject/qxbjuctx.html
网友评论