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.

貢獻者指南