Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

create aframe element instead of aframe-react Entity #1

Closed
wants to merge 1 commit into from

Conversation

jhsu
Copy link

@jhsu jhsu commented Mar 17, 2017

instead of proxying props through <Entity /> we can just return an aframe element that accepts all the props the primitives accept.

I was thinking about creating react components for the primitives when I saw this library. 馃憤

const renderEntityWithPrimitive = name => props =>
<Entity primitive={name} {...omit(props, OMIT_PROPS)} />;
const renderEntityWithPrimitive = primitive => props =>
React.createElement(primitive, props);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses createElement with aframe's primitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant