Fork me on GitHub

Hey, I'm not sure if this stack trace is sufficient info. Any ideas on how to fix this error?


TypeError: Cannot read property '__reactAutoBindPairs' of undefined
    at reagent1 (cljs_base.js:formatted:560)
    at cS (cljs_base.js:formatted:24647)
    at sU (cljs_base.js:formatted:27645)
    at mU (cljs_base.js:formatted:27157)
    at dU (cljs_base.js:formatted:26925)
    at rR (cljs_base.js:formatted:26709)
    at vU (cljs_base.js:formatted:28133)
    at cljs_base.js:formatted:28202
    at qU (cljs_base.js:formatted:26965)
    at AU (cljs_base.js:formatted:28201)


I have run lein cljsbuild once min to generate js files and I'm trying to attach these files via script tags to a HTML page.

Chris McCormick12:06:01

this error looks like it is coming from an :advanced compilation artifact. you might be able to get more info with the compiler flag :pseudo-names true as per you probably know this already but you can get a working reagent project up and running quite quickly with lein new reagent-frontend myproject and then run lein figwheel inside myproject to launch it and lein package to build the static version you can deploy.

Mario C.16:06:21

I am currently working on a CLJS project. The project uses OM and it breaks my heart to say that the app is essentially one really long file. Everything is tightly coupled. The team and I want to move away from OM and transition to Reagent/Re-frame. I gave it a shot but it doesn't look like it possible (or straight forward) since adding reagent/re-frame seemed have to cause some react issues. (Errors complaining that some things were undefined such as isValidContainer). I was wondering if it was possible to use Om with Re-frame? I'd like to be able to at least off-load state handling to a more centralized state-management system like reframe. Anyone know if this is possible? More specifically if I can use re-frame's subscribe method to trigger updates in much the same way it would with reagent components.


I'm not sure if it's possible to have reagent components inter-operate with om components. I also think the way a reagent/re-frame app is written presents an entirely different paradigm/way of building web apps.


IMO, I think it's wise to just rewrite the whole app in reagent/re-frame instead of trying to refactor some pieces of the already existing one.

Mario C.20:06:54

@USWTQB9RU Thank you! Yea my goal was to have OM components be as dumb as possible and only render the view. While the state management is handled by re-frame. I was thinking of "tricking" the om component by wrapping the subscribe to a OM cursor. That way if that updates then the Om's cursor update, triggering an update. I haven't tested that out yet. But it may be the case that we are too far down the rabbit hole that its not possible to do a whole rewrite. At least not with our man power