gpbl/denormalizr

Support memoization

开放

#10 创建于 2016年6月8日

 (11 条评论) (5 个反应) (0 位负责人)JavaScript (24 个派生)github user discovery
enhancementhelp wantednew feature

仓库指标

星标
 (229 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

In my mind, denormalizr is most useful when passing large nested objects to a component using connect. But currently it always returns a new object, so the component re-renders on every action.

denormalize should always return the same (strictly equal) result unless:

  1. The root object is different
  2. Any of the associations in the schema are different

I believe this could be accomplished fairly simply using a cache of denormalized resources.

贡献者指南