ngrx和ngxs之间的性能差异?

编程入门 行业动态 更新时间:2024-10-26 06:26:47
本文介绍了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之间的性能差异?

本文发布于:2023-10-21 17:14:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1514842.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:差异   性能   ngrx   ngxs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!