aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
655 stars 203 forks source link

Fix 'Can only update a mounted or mounting component' #258

Closed fernandojsg closed 8 years ago

fernandojsg commented 8 years ago

With the latest changes trying to prevent forceUpdate() on componentchanged I generated a random key for the component, but this is generating the component to regenerate itself and some update events from the widgets are conflicting with the mounting of the component as is stated on the console:

warning.js:44 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the undefined component.

I've changed it back to forceUpdate() to get rid of this until we'll find a better solution. /cc @ngokevin

ngokevin commented 8 years ago

r+, redux would solve all of this later anyways

fernandojsg commented 8 years ago

Perfect! Thanks