Skip to content

Instantly share code, notes, and snippets.

@tyv
Last active July 7, 2016 15:31
Show Gist options
  • Save tyv/5c84eaa156048f3518b4f5a1e2fb2cee to your computer and use it in GitHub Desktop.
Save tyv/5c84eaa156048f3518b4f5a1e2fb2cee to your computer and use it in GitHub Desktop.
function A(props) {
return (
const {unknown, ...rest} = props
<A prop={unknown}
// input still contains a lot of `Unknown`
// because B require them
<input {...rest} />
<B {...rest} />
</A>
)
}
A.defaultProps = {
unknown: 'unknown',
oneMoreUnknown: 'oneMoreUnknown',
anotherUnknown: 'anotherUnknown',
thirdUnknown: 'thirdUnknown',
onChange: function() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment