Fork me on GitHub
#devcards
<
2016-04-12
>
currentoor18:04:58

With cljsjs/fixed-data-table in devcards it works fine. But in my main app the fixed-data-table code throws an error because ReactDOM is undefined, even though ReactDOM is available as a global var in the js console.

currentoor18:04:33

Does devcards do anything special to make sure ReactDOM is defined in cljsjs packages?

bhauman18:04:08

@currentoor: You probably are not requiring ReactDOM before its first use.

bhauman18:04:05

You have to require cljsjs.react and cljsjs.reactdom.

currentoor18:04:50

@bhauman: I'll try adding those two the to top of my :require statements.

bhauman18:04:27

If you have to level code that is executing on file load you need to make sure that the require happens before that code executes

bhauman18:04:43

"Top level"

bhauman18:04:17

I would go to your root file and require it there. And then look at the Dom and see what order things are loading

currentoor18:04:08

Good idea, I'll try that. Thanks!

currentoor19:04:51

@bhauman: it works now, Thank you very much!