-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some components cannot be used until React Component is mounted #52
Comments
That's weird since A-Frame won't try to execute the components until the entity is mounted. |
This is also after the a-scene's loading event is fired, if it helps |
OK thanks, got a lot of maintenance lined up for aframe-react :) |
Looks like I was wrong about that bug being related here, that example does not inject the component within an a-scene |
v4.0.x should solve since |
Added unit test for wrapped entity. 44bee27 Didn't see any errors in the log. Should work now since everything is initialized only once after the |
When adding a raycaster and cursor component (to represent an
<a-cursor>
) to an entity, the element gets created before mounted to the DOM, causing the raycaster component'sthis.el.sceneEl
to be undefined (as it has yet to be mounted), throwing an error and causing the scene to fail to render. A work around is to wait until the component is mounted to DOM and then adding more components, but this took some time to figure out. Similar to assumptions in #50 of when things are mounted and initialized, I wonder if there's a general way of handling this for all components.The text was updated successfully, but these errors were encountered: