Dva: 大神久仰,希望问您一下为什么在routes文件夹里面写组件?这里面组件有的引用component的组件,这两个文件夹的组件有什么不同?

Created on 24 Oct 2017  ·  1Comment  ·  Source: dvajs/dva

Code to reproduce the issue: (请提供可复现的代码或者步骤)

Expected behavior: (预期的正常效果)

Actual behavior: (实际效果)

Versions of packages used: (哪个库的哪个版本出现的问题)

Most helpful comment

routes 就相当于以前写的 html,只不过这里换成了 jsx 语法写在 js 文件里;models 就相当于以前在 html 里写的 js 代码用来控制 html 页面按钮等触发事件,普通 js 方法和 ajax 提交异步请求(在 models 里的 effects 里写);component 相当于你使用如 bootstrap 里的公共组件。

>All comments

routes 就相当于以前写的 html,只不过这里换成了 jsx 语法写在 js 文件里;models 就相当于以前在 html 里写的 js 代码用来控制 html 页面按钮等触发事件,普通 js 方法和 ajax 提交异步请求(在 models 里的 effects 里写);component 相当于你使用如 bootstrap 里的公共组件。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mclouvem picture mclouvem  ·  4Comments

ljjsimon picture ljjsimon  ·  3Comments

itiwll picture itiwll  ·  4Comments

BenAnn picture BenAnn  ·  3Comments

seamys picture seamys  ·  4Comments