Uncaught Invariant Violation: onlyChild must be passed a children with exactly one child.
Are you using Reagent and Bootstrap with ClojureScript, and getting this error?
In my case, the cause was that I had a
when inside an
OverlayTrigger. Seems like a no-no. Further testing showed you can’t have an
if either. Looks like
OverlayTrigger can only wrap data, not something that might change.
In my case the solution was simple enough, once I figured out the cause: I just extracted
when to wrap the
OverlayTrigger, instead of the other way around.
OK, this is going to be a tough one. Strap down, even if it pisses you off at first - I wouldn’t be writing it if I didn’t think it was helpful.
Stop me if you’ve heard this one before
A programmer has something he wants to build.
He finds a framework.
It looks easy enough to get into. There’s a few tutorials available, which show step by step how to build a basic application of just the right type.
He’s happy. He feels really productive. CRUD just “drops out” of the framework’s design. It’s like it was created with his problem in mind.
Then he’s done with the tutorials. He starts plugging in his own, specific requirements. Every so often he hits a snag, but that’s OK, he can just twist the framework’s arm a bit, right?
It all goes well for a while. Then he hits a big one. The framework doesn’t do quite work the way he wants it to.