Last active
December 16, 2017 11:56
-
-
Save collinglass/5700872cd5614e012fd456217dbb7fc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class MessageContainer extends React.Component { | |
// ... | |
renderFooter() { | |
if (this.props.renderFooter) { | |
const footerProps = { | |
...this.props, | |
}; | |
return this.props.renderFooter(footerProps); | |
} | |
return null; | |
} | |
renderLoadEarlier() { | |
if (this.props.loadEarlier === true) { | |
const loadEarlierProps = { | |
...this.props, | |
}; | |
if (this.props.renderLoadEarlier) { | |
return this.props.renderLoadEarlier(loadEarlierProps); | |
} | |
return ( | |
<LoadEarlier {...loadEarlierProps}/> | |
); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment