-
-
Save tyv/5c84eaa156048f3518b4f5a1e2fb2cee 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
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