gpbl/denormalizr

Support memoization

オープン

#10 opened on 2016/06/08

 (11 件のコメント) (5 件のリアクション) (0 人の担当者)JavaScript (24 件のフォーク)github user discovery
enhancementhelp wantednew feature

Repository metrics

Stars
 (229 個のスター)
PR merge metrics
 (30d に merged 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.

コントリビューターガイド