Created
December 16, 2017 19:08
-
-
Save olegkalyta/0d2708e20c2c259efb7599cdb4409d4a to your computer and use it in GitHub Desktop.
This file contains 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
const newProps = { ...rest } | |
if (mapFetchedDataTo) { | |
delete newProps.data | |
newProps[mapFetchedDataTo] = this.props.data | |
} | |
const chidlrenWithProps = cloneElement(children, newProps) | |
const dataValidationErrors = this.getRequiredDataErrors() | |
if (dataValidationErrors.length > 0) { | |
return <div>{dataValidationErrors}</div> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment