dillon1000/react
Commit
Browse files Remove `isStatic`
This can be replicated with a custom component that always returns false`
from `shouldComponentUpdate`. A generic implementation might look like:
```
var StaticContainer = React.createClass({
shouldComponentUpdate: function() {
return false;
},
render: function() {
return this.transferPropsTo(this.props.children[0]);
}
});
```
And then used in JSX as
`<StaticContainer><div>Hello!</div></StaticContainer>`, resulting in
only `<div>Hello!</div>` being inserted into the DOM.Changed paths2 files
First-parent comparisonsrc/core/ReactCompositeComponent.js ModifiedM src/core/ReactMultiChild.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…