Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript React通量应用程序的依赖关系树应如何与通量控制流关联?_Javascript_Reactjs_Flux_Reactjs Flux - Fatal编程技术网

Javascript React通量应用程序的依赖关系树应如何与通量控制流关联?

Javascript React通量应用程序的依赖关系树应如何与通量控制流关联?,javascript,reactjs,flux,reactjs-flux,Javascript,Reactjs,Flux,Reactjs Flux,参考示例React.js Flux tutorial项目,了解为什么依赖项调用似乎并不总是与Flux流程图中箭头的方向具有相同的正相关或负相关,这将很有帮助,如下所示(注意调用与箭头方向相反的情况): 流量图来源: “视图”类别中的模块包括: main.jsx (View calls Store in OPPOSITE direction of arrow as well as other view components) components/SchoolsList.jsx (View ca

参考示例React.js Flux tutorial项目,了解为什么依赖项调用似乎并不总是与Flux流程图中箭头的方向具有相同的正相关或负相关,这将很有帮助,如下所示(注意调用与箭头方向相反的情况):

流量图来源:

“视图”类别中的模块包括:

main.jsx (View calls Store in OPPOSITE direction of arrow as well as other view components)
components/SchoolsList.jsx (View calls other View components)
components/SchoolsInfo.jsx (View calls Action in direction of arrow)
components/AddSchool.jsx (View calls Action in direction of arrow)
dispatcher.js (Action calls Dispatcher in direction of arrow)
dispatcher.js (Does not call other Flux blocks. Only call is to guid lib)
schoolStore.js (Store calls Dispatcher in the OPPOSITE direction of arrow)
“行动”类别中的模块包括:

main.jsx (View calls Store in OPPOSITE direction of arrow as well as other view components)
components/SchoolsList.jsx (View calls other View components)
components/SchoolsInfo.jsx (View calls Action in direction of arrow)
components/AddSchool.jsx (View calls Action in direction of arrow)
dispatcher.js (Action calls Dispatcher in direction of arrow)
dispatcher.js (Does not call other Flux blocks. Only call is to guid lib)
schoolStore.js (Store calls Dispatcher in the OPPOSITE direction of arrow)
“Dispatcher”类别中的模块包括:

main.jsx (View calls Store in OPPOSITE direction of arrow as well as other view components)
components/SchoolsList.jsx (View calls other View components)
components/SchoolsInfo.jsx (View calls Action in direction of arrow)
components/AddSchool.jsx (View calls Action in direction of arrow)
dispatcher.js (Action calls Dispatcher in direction of arrow)
dispatcher.js (Does not call other Flux blocks. Only call is to guid lib)
schoolStore.js (Store calls Dispatcher in the OPPOSITE direction of arrow)
“商店”类别中的模块包括:

main.jsx (View calls Store in OPPOSITE direction of arrow as well as other view components)
components/SchoolsList.jsx (View calls other View components)
components/SchoolsInfo.jsx (View calls Action in direction of arrow)
components/AddSchool.jsx (View calls Action in direction of arrow)
dispatcher.js (Action calls Dispatcher in direction of arrow)
dispatcher.js (Does not call other Flux blocks. Only call is to guid lib)
schoolStore.js (Store calls Dispatcher in the OPPOSITE direction of arrow)

清楚地说,问题是依赖项调用如何映射到箭头?尤其值得一提的是,如果能找到一个解释,来协调箭头方向与依赖项调用之间不一致的相关性,那将是非常有帮助的。

箭头代表数据流,而不是依赖项方向。存储并没有分派任何东西,只是将自己注册到分派器,以便对操作做出反应。我强烈建议您看看redux。这是简单、优雅的通量(没有调度程序部分)@azium感谢您的快速反馈。对于redux开销和学习曲线与flux相比有什么快速的想法吗?将应用程序从flux迁移到redux所需的重构量?redux学习曲线比FB推出的原始flux模式要宽松得多(他们现在使用redux)。了解的东西越少,编写的代码越少,心智模型就越容易。迁移可能是一件痛苦的事,我想这取决于你的生活距离有多远。我会做redux教程,亲自体验迁移的痛苦。可能没有!箭头表示数据流,而不是依赖方向。存储并没有分派任何东西,只是将自己注册到分派器,以便对操作做出反应。我强烈建议您看看redux。这是简单、优雅的通量(没有调度程序部分)@azium感谢您的快速反馈。对于redux开销和学习曲线与flux相比有什么快速的想法吗?将应用程序从flux迁移到redux所需的重构量?redux学习曲线比FB推出的原始flux模式要宽松得多(他们现在使用redux)。了解的东西越少,编写的代码越少,心智模型就越容易。迁移可能是一件痛苦的事,我想这取决于你的生活距离有多远。我会做redux教程,亲自体验迁移的痛苦。可能没有!