5 Matching Annotations
- Oct 2020
In the next major, we'll start copying the ref onto both the props and the element.ref. React will now use the props.ref as the source of truth for forwardRef and classes and it will still create a shallow copy of props that excludes the ref in these cases. At the same time, we'll add a getter for element.ref in DEV that warns if you access it. The upgrade path is now to just access it off props if you need it from the element.
The backwards compatible implementation of jsx(...), we would still support key passed as props. We'd just pull it off props and issue a warning that this pattern is deprecated. The upgrade path is to just pass it to JSX separately if you need it.
This would be a breaking change, but we could always clone in the call in a minor and then make the breaking change later in a major.
It's much easier to iterate on new versions by deploying npm packages than updates to the compiler toolchain. Therefore, it might be best if the actual implementation still lives in the react package.
the actual upgrade path should be very simple for most people since the deprecated things are mostly edge cases and any common ones can be codemodded
- single source of truth
- breaking change
- code modification tools
- in-place upgrade
- iterative process
- backwards compatible
- react: forwardRef
- upgrade path