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

[feature] new api this.id('abc') === 'component_instance_id + abc' to make html have scope. #12339

Closed
xialvjun opened this issue Mar 7, 2018 · 1 comment

Comments

@xialvjun
Copy link

xialvjun commented Mar 7, 2018

HTML doesn't have a concept of scope, but it do use concept like variable at many where(like <input id="abc"/><label for="abc">abc</label>). We should add scope to html.

Maybe you say "for label, we can wrap input in label", but it changes the html structure, and there are many other scene using html variable like spectre.

So why not add an api this.instance_id or this.generate_id(abc: string) => this.instance_id + '/' + abc or whatever others can make html scope.

@dantman
Copy link
Contributor

dantman commented Mar 11, 2018

reactjs/rfcs#32

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

2 participants