react-computed-props icon indicating copy to clipboard operation
react-computed-props copied to clipboard

Idea: Include a change digest

Open pbeshai opened this issue 8 years ago • 0 comments

It would be cool to give an object that listed props as keys and true/false if they changed or not. This would enable components to check if certain subset of props changed and then only update those subsections. For example, if the component has props a, b, and c, and b and c change, then it would receive another prop propChanges:

{
  a: false,
  b: true,
  c: true
}

Or maybe it's better to exclude props that did not change, so Object.keys() returns the number of changes.

{ 
  b: true,
  c: true,
}

pbeshai avatar Oct 16 '16 22:10 pbeshai