dillon1000/react
Commit
Browse files Cache Default Props
The `getDefaultProps` return value should not be dependent on any external data (including `this.props` and `this.state`), so the return value should be consistent everytime we call it. This caches the return value so we do not do work and allocate memory unnecessarily.
Changed paths1 file
First-parent comparisonsrc/core/ReactCompositeComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…