mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
13710c68616cf643d3cdfd69e5f39b2dc5a801b4
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 commit https://github.com/facebook/react/commit/ea24427d16f3ac9b0f3bb45cdc7919ac208130c9.
react-fbsource-import
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%