gpbl/denormalizr

Support memoization

Offen

#10 geöffnet am 08.06.2016

 (11 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)JavaScript (24 Forks)github user discovery
enhancementhelp wantednew feature

Repository-Metriken

Stars
 (229 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide