ngrx和ngxs之间的性能差异? [英] Difference in performance between ngrx and ngxs?

查看:563
本文介绍了ngrx和ngxs之间的性能差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Angular 6应用程序中使用ngxs进行状态管理.

I want to use ngxs for state management in my Angular 6 application.

但是我不确定大型项目是否成熟.

But I am not sure if it is mature for big projects.

我找不到有关ngrx和ngxs之间的性能差异的任何文章. 有人可以提供一些信息吗?

I can not find any articles about Difference in performance between ngrx and ngxs. Can someone provide some info about it?

性能指标:从商店中获取大量商品并写回商店.

Performance metrics: Getting a large number of items form the store and writing back into the store.

推荐答案

这是Reddit的很好答案(Angular2 +社区).来自同时测试了两者并切换到NGXS的开发人员.

Here is good answer from Reddit (Angular2+ community). It's from a developer who tested both and switched to NGXS.

我想分享我的经验.我们有一个中型企业 应用程序.我们从NGRX开始,但是很快就清楚了

I would like to share my experience. We have a medium-large enterprise app. We started with NGRX, but it quickly became clear that

NGRX代码很难理解并写给队友.

NGRX code is much difficult to understand and write to teammates.

NGRX简直是地狱.您花了很多时间.

NGRX is boilerplate hell. You spend lot of time with it.

效果"的概念很好,但只是增加了 复杂性可以简化.

The concept of "Effects" is good, but it just adds extra layers of complexity which could be simplified.

开发人员体验(DX)令人震惊.

Developer Experience (DX) was horrifying.

然后我们切换到NGXS.

Then we switched to NGXS.

具有最小的样板.您直接跳到动作":D.

It has minimum boilerplate. You jump right into "action" :D.

我们为它的DX感到高兴.

We were delighted by its DX.

对于队友来说,理解起来要容易得多,每个人都 突然变得富有成效.

It is much easier to understand for teammates and everybody was suddenly productive.

有些折衷,例如服务器调用在减速器中,但是它 一段时间后使用是合理的.

There are some tradeoffs like server calls are in reducers, but it made sense to use after a while.

插件!从日志记录到表单处理,都有大量的插件 (真棒).

PLUGINS! There are loads of plugins from logging to forms handling (Awesome thing ever).

这篇关于ngrx和ngxs之间的性能差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆