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

Ch04 Refs 與表單處理 #59

Open
yachtingchen opened this issue Jan 13, 2017 · 0 comments
Open

Ch04 Refs 與表單處理 #59

yachtingchen opened this issue Jan 13, 2017 · 0 comments

Comments

@yachtingchen
Copy link

yachtingchen commented Jan 13, 2017

"Refs 與表單處理"章節中提到的ref用法,在react官網上https://facebook.github.io/react/docs/refs-and-the-dom.html 已經不建議使用了,節錄如下:

If you worked with React before, you might be familiar with an older API where the ref attribute is a string, like "textInput", and the DOM node is accessed as this.refs.textInput. We advise against it because string refs have some issues, are considered legacy, and are likely to be removed in one of the future releases. If you're currently using this.refs.textInput to access refs, we recommend the callback pattern instead.

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