You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a React component that does a similar or even the same thing like preact-markup? Or is it possible to use preact-markup with React somehow? I don't want to fully switch to Preact right now, so this is not an option.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
This library had originally been designed to work with either Preact or React, but the use of render arguments makes it Preact-specific. I'd be open to a PR to fix that. If fixed, you'd be able to do this
importReactfrom'react'importReactDOMfrom'react-dom'importMarkupfrom'preact-markup'// tell Markup to use React VDOM elementsMarkup.setReviver(React.createElement)ReactDOM.render(<Markupmarkup="<strong>hello</strong>"/>,document.body)
I was looking into this as well. And one thing I ran into is the difference between h() and React.createElement(); Preact exposes a nodeName attribute and React exposes a type.
Is there a React component that does a similar or even the same thing like
preact-markup
? Or is it possible to usepreact-markup
with React somehow? I don't want to fully switch to Preact right now, so this is not an option.Thanks in advance!
The text was updated successfully, but these errors were encountered: