Hello, I'm using an UI library from NPM that provides a PageHeader
component which accepts a prop called extra
which is an array of components that can be added to it. For example:
<PageHeader
title="Title"
extra={[
<div>first</div>,
<div>second</div>
]}
/>
I'm trying to use this prop with Reagent like this:
[:> PageHeader {:title "title"
:extra [[:div "first"]
[:div "second"]]
}]
but the components are printed out as strings in the DOM (ss in the thread). I don't know how Reagent interprets this form of components being passed as props or what I'm missing here. Can anybody help me? Thanks!This is the result in the DOM
Wrap the Hiccup vectors in reagent.core/as-element
.
It works. Thanks!
Hi folks, It seems for some reason reagent can’t find react anymore, and I get these kind of messages:
Uncaught TypeError: $reagent$impl$component$$.$node$module$react$ is undefined
how to debug this. With figwheel locally it works, also the compiled minified bundle (with :psueod-names true) shows that React / ReactDOM are in there
Any pointers in how to debug this?
Did you import react somehow?
@kah0ona it's a version conflict, almost certainly
just ran into this recently