rescript-react icon indicating copy to clipboard operation
rescript-react copied to clipboard

Expose ReactDOM.Props.domProps separately and concat?

Open AlexMoutonNoble opened this issue 3 years ago • 1 comments

Hi All I am trying to compactly wrap a native input using createDOMElementVariadic, since input props are expansive and who wants to repeat all that. I notice that createDOMElementVariadic takes domProps, but that domProps and props are both @deriving(abstract) in the same module, so the accessors for domProps are shadowed. Also, with the types being abstract I can't add props to an existing domProps.

How does a PR for separating domProps to its own module and providing a concat operator sound?

AlexMoutonNoble avatar Jul 11 '22 17:07 AlexMoutonNoble

Can you elaborate on your intention with an example? What prop do you want to add? Anyway, with V10.*, the new JsxDOM module is opt-in, so you can do something like this. image If the new version of rescript-react is released, ReactDOM is bound to JsxDOM. You can use it together with the new jsx ppx v4.

mununki avatar Jul 24 '22 13:07 mununki

Yes, this should be resolved with JSX v4, closing.

cknitt avatar Sep 26 '22 15:09 cknitt