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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9] experiment: extend factory overload #2785

Merged
merged 10 commits into from
Sep 17, 2023

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented Mar 1, 2023

Allows extend to accept a class and return a typed React component for it, inferring the function and catalogue name. This creates an anonymous catalogue key while preserving the original class name for devtools. Useful for libraries to not clash with user-defined elements where <primitive /> is not preferable.

const Component = extend(class extends THREE.Object3D {})
<Component />

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 1, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f00b87d:

Sandbox Source
example Configuration

@CodyJasonBennett CodyJasonBennett changed the title experiment: extend factory overload [v9] experiment: extend factory overload Mar 1, 2023
@CodyJasonBennett CodyJasonBennett mentioned this pull request Sep 17, 2023
18 tasks
@CodyJasonBennett CodyJasonBennett merged commit 642c0ca into v9 Sep 17, 2023
1 check passed
@CodyJasonBennett CodyJasonBennett deleted the experiment/extend-factory-overload branch September 17, 2023 14:04
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.

1 participant