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

Stop using "key" for component references #121

Closed
mairatma opened this issue Jun 1, 2016 · 0 comments
Closed

Stop using "key" for component references #121

mairatma opened this issue Jun 1, 2016 · 0 comments
Labels

Comments

@mairatma
Copy link
Contributor

mairatma commented Jun 1, 2016

Some of you might have already used this functionality from Metal.js, of specifying a key to reference sub component instances.

I've recently noticed that using key for this this can cause problems, since that's also used internally by incremental dom for optimizing rendering paths (similar to React's key for virtual dom). Using it for component references could cause problems since we're merging two functionalities here.

React uses ref instead for this, so I thought that this would be the best name for us too, since the usage is basically the same.

I've just finished this change and released the latest version, so I'm creating this issue more for documenting the change, in case anyone has issues with key suddenly not working anymore. Just replace it with ref and all will be fine :)

I've already updated the site with this too, so take a look if you're curious.

@mairatma mairatma added the api label Jun 1, 2016
@mairatma mairatma closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant