我读到Redux Thunk是管理异步操作/请求的可靠方法.没有太多关于通过其他行动调度行动的事情.
如何调度同步动作?我不确定thunk方法的性能问题,但是我可以在其他动作创建者中调度动作而不在其中定义函数吗?
在我看来,使用redux thunk对于这种需求是不必要的.
我正在尝试过滤嵌套聚合的桶.
制图:
{
"dev.directory.3" : {
"mappings" : {
"profile" : {
"properties" : {
"events" : {
"type" : "nested",
"properties" : {
"id" : {
"type" : "integer"
},
"name" : {
"type" : "string",
"index" : "not_analyzed"
},
}
},
"title" : {
"type" : "string"
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
指数数据:
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "dev.directory.3",
"_type" : "profile",
"_id" : "1",
"_score" : …
Run Code Online (Sandbox Code Playgroud) 除了使用flux / redux体系结构,React组件应如何与服务进行通信?
例如: 有一个容器,只有很少的代表性(反应)组件:
将它们视为资源表示形式,我希望它们中的每一个都可以自己访问Microservice API(获取或更新数据)。它是否正确?它将提供干净的责任管理模型,但是使用http请求加载每个组件的内容会给性能带来疑问
这个问题还涉及:如何为多个(微)服务执行有效的通信?