Created
July 18, 2015 10:53
-
-
Save rpominov/f25a2593ee1d91ba3b88 to your computer and use it in GitHub Desktop.
React-demo concept
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
/* Will render <Counter/>, a number input, | |
* and a log-output widget with all onChange calls e.g. | |
* > onChange(1) | |
* > onChange(2) | |
*/ | |
<Demo | |
target={Counter} | |
props={{ | |
count: Demo.props.int.arbitrary | |
onChange: Demo.props.callback.log | |
}} | |
/> | |
// Aternative API | |
<Demo props={...}> | |
{props => <Counter ...props/>} | |
</Demo> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/rpominov/react-demo