Closed SilentCicero closed 7 years ago
This would be most useful to have.
We already have this feature, no spread is needed though.
https://github.com/substack/hyperx/blob/master/test/key.js#L46
Great to know! Thanks @JamesKyburz, I didn't know.
Wow, awesome thanks @JamesKyburz maybe we should add this to the ReadMe or make it more clear in the docs.
In JSX you can use spread naturally
<MyReactComponent ...props>
. I think for hyperx we should support a simple spread operator:<MyHyperxComponent ...${props}>
.I added this already by overriding my
createElement
function foryo-yo
, works great and is super useful. A great little feature. The notation is different enough that it shouldn't effect existing hyperx components, but is super useful for building higher level components that are essentially bypasses.The only other way to do this is by overriding the createElement methods of other libs like yo-yo and bel. Not very nice really.
Love hyperx, best.