8000 Use callback instead of string refs. by dan-lee · Pull Request #100 · glennflanagan/react-collapsible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use callback instead of string refs. #100

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

Merged
merged 1 commit into from
Jun 19, 2018
Merged

Use callback instead of string refs. #100

merged 1 commit into from
Jun 19, 2018

Conversation

dan-lee
Copy link
Contributor
@dan-lee dan-lee commented Jun 18, 2018

This PR replaces string refs with callback refs.

See manual:

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.

As the library still supports React versions <16.3, I did not replace it with the even newer React.createRef().

Also it seems that the outer ref was not in use, so I removed it.

@glennflanagan
Copy link
Owner

Great work. Thanks @dan-lee

@glennflanagan glennflanagan merged commit 4ac687d into glennflanagan:develop Jun 19, 2018
@TkDodo
Copy link
TkDodo commented Aug 22, 2018

When can we expect this to be released ?

@dan-lee
Copy link
Contributor Author
dan-lee commented Aug 22, 2018

Would appreciate a release too 💫

@karltaylor
Copy link
Collaborator

@dan-lee @TkDodo just published 2.3.0 😊

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.

4 participants
0