purescript-react / purescript-react-basic-dom

https://pursuit.purescript.org/packages/purescript-react-basic-dom
Apache License 2.0
11 stars 18 forks source link

Unwrapped versions of DOM components #16

Open paluh opened 3 years ago

paluh commented 3 years ago

Thanks again for building react-basic!

Currently this library provides bindings to DOM components but wraps it in ref forwarding and processes aria and data props in the constructor. This breaks compatibility with libs like helmet where the tool expects native components (it checks child.type against a set of tag names like title, meta etc.).

Would you be so kind and tell me if you think that an addition of something like DOM.Unwrapped which provides components based on a simple unsafeCreateDOMComponent tagName = unsafeCoerce tagName without ref forwarding and props processing is a good idea?

megamaddu commented 3 years ago

Yeah, that seems reasonable to me