-
Notifications
You must be signed in to change notification settings - Fork 52
Description
I'd like to get the examples working in jsfiddles; to that end my understanding is that it should be possible to include the dist/react-magic-move.js script as a normal script reference, after the usual React support scripts (including the in-browser JSXTransformer).
However, my minimally-adapted version of the basic ('States') example on top of the "React Base Fiddle (JSX)" is triggering an odd React invariant error near the wrapup of the initial render: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component'srendermethod). Try rendering this component inside of a new top-level component which will hold the ref.
The component-setup code is unchanged, so any owner-setup should still work. I thought it might be a problem specific to JSFiddle's panel setup, so I tried an entirely local-files setup – same error. I'm now thinking it may be a namespace issue arising from not loading-via-require()s, or an incompatibility with in-browser JSXTransformer use. (If the problem is either of these, it might merit a dist-script fix or doc note.)
You can view the error-triggering setup at: http://jsfiddle.net/69z2wepo/4692/
Any ideas?