reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

Ref issue with React Fiber #213

Closed jaredpalmer closed 7 years ago

jaredpalmer commented 7 years ago

Trying to upgrade my app to Fiber. I am getting this error in my jest snapshot test.

Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` metho
d, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

      at invariant (../node_modules/fbjs/lib/invariant.js:44:15)
      at Object.addComponentAsRefTo (../node_modules/react-test-renderer/lib/ReactOwner.js:68:68)
      at attachRef (../node_modules/react-test-renderer/lib/ReactRef.js:23:16)
      at Object.<anonymous>.ReactRef.attachRefs (../node_modules/react-test-renderer/lib/ReactRef.js:42:5)
      at ReactTestComponent.attachRefs (../node_modules/react-test-renderer/lib/ReactReconciler.js:23:12)
      at CallbackQueue.notifyAll (../node_modules/react-test-renderer/lib/CallbackQueue.js:76:22)
      at ReactTestReconcileTransaction.close (../node_modules/react-test-renderer/lib/ReactTestReconcileTransaction.js:36:26)
      at ReactTestReconcileTransaction.closeAll (../node_modules/react-test-renderer/lib/Transaction.js:206:25)
      at ReactTestReconcileTransaction.perform (../node_modules/react-test-renderer/lib/Transaction.js:153:16)
      at batchedMountComponentIntoNode (../node_modules/react-test-renderer/lib/ReactTestMount.js:69:27)
jaredpalmer commented 7 years ago

Oops. I forgot to also upgrade react-test-renderer to Fiber.