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

injectComponentClasses won't work for ReactHostComponent #13

Open
snowmantw opened this issue Jul 28, 2016 · 0 comments
Open

injectComponentClasses won't work for ReactHostComponent #13

snowmantw opened this issue Jul 28, 2016 · 0 comments

Comments

@snowmantw
Copy link

I try to extend my own renderer and found the code in React codebase:

https://github.com/facebook/react/blob/20bcabb1ea4cf492ade240bd6915b4bd44f04895/src/renderers/shared/stack/reconciler/ReactHostComponent.js#L18

actually won't use costumed registry for component mapping.

Such implementation has been changed: now they use the generic component to dispatch to the correct one. The latest commit and file still uses the pattern is:

https://github.com/facebook/react/pull/4030/files#diff-2d144b75481a75f394d00eedc6005297L112

In the current version, it has become things like this:

https://github.com/facebook/react/blob/30aa84181d98dc9498f7e1eb3ded817d8faf65f6/src/renderers/dom/shared/ReactDOMComponent.js#L537

Concluded by that, I changed my implementation to dispatch to the corresponding constructor via the generic one. So maybe the comment should be changed as well.

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

No branches or pull requests

1 participant