Created
October 11, 2017 12:33
-
-
Save monkindey/f556ca991e98b88456f8e39a9e7943b9 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
class Slider extends Component{ | |
renderPlugins(){ | |
let { children } = this.props; | |
let dataModel = {...this.props,...this.state}; | |
return do{ | |
if(typeof children=='function'){; | |
children(dataModel) | |
}else{ | |
children; | |
} | |
} | |
} | |
render(){ | |
return <div> | |
hello world | |
{this.props.children && this.renderPlugins() } | |
</div> | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment