Skip to content

Instantly share code, notes, and snippets.

@rpominov
Created July 18, 2015 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpominov/f25a2593ee1d91ba3b88 to your computer and use it in GitHub Desktop.
Save rpominov/f25a2593ee1d91ba3b88 to your computer and use it in GitHub Desktop.
React-demo concept
/* 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>
@rpominov
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment