mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fb3bede17d7d33daca0d46fd0e39b4c4fbf5b651
Previously, the `refs` property of a class component instance was
read-only by user code — only React could write to it, and until/unless
a string ref was used, it pointed to a shared empty object that was
frozen in dev to prevent userspace mutations.
Because string refs are deprecated, we want users to be able to codemod
all their string refs to callback refs. The safest way to do this is to
output a callback ref that assigns to `this.refs`.
So to support this, we need to make `this.refs` writable by userspace.
DiffTrain build for [ea24427d16](https://github.com/facebook/react/commit/ea24427d16f3ac9b0f3bb45cdc7919ac208130c9)
Please do not delete this branch
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%