A minimalistic ClojureScript interface to React.js
Nathan 2020-10-28T09:34:01.151600Z

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:

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!

Nathan 2020-10-28T09:34:10.151700Z

This is the result in the DOM

p-himik 2020-10-28T09:35:06.152100Z

Wrap the Hiccup vectors in reagent.core/as-element.

Nathan 2020-10-28T10:04:42.152400Z

It works. Thanks!

kah0ona 2020-10-28T11:47:47.153600Z

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

kah0ona 2020-10-28T11:48:31.154500Z

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

kah0ona 2020-10-28T11:48:50.154700Z

Any pointers in how to debug this?


Did you import react somehow?

unbalanced 2020-10-28T19:20:23.155700Z

@kah0ona it's a version conflict, almost certainly

unbalanced 2020-10-28T19:20:29.155900Z

just ran into this recently