i ran into trouble when using Helix with Slate. i believe my trouble is specific to Helix. my question is, how do i define a component that “passes the children through?” (forgive my bad terminology).
the React code i am using as basis is:
const CodeElement = props => {
return (
<pre {...props.attributes}>
<code>{props.children}</code>
</pre>
)
}
my attempt to put it into CLJS with Helix is:
(defnc code-element [props]
(d/pre (.-attributes props)
(d/code (.-children props))))
i have little experience with Helix. but in Reagent hiccup, that final line would look something like (into [:code] (:children props)
.
i am hoping somebody with Helix experience could see this and spot some obvious flaw.