Update createRef to match the new React 16.3 api#4598
Conversation
|
So the API change from .value to .current? Any chance it's going to change again, or do we know this is the final version. Also, this is a pretty big change for anyone that wrote code expecting the old api. Any chance we can deprecate the .value and support both until a future release? If we are going to rip off the bandaid, we need to make sure to communicate that REALLY well. I just did a couple workshops where I demo'ed the .value approach. |
|
It's fairly sure it's not going to change again as it's now released as part of the latest React version. I think it's ok to add a deprecation and continue to support |
|
@micahgodbolt I've added a |
|
Thank you for updating it!! |
* master: Applying package updates. ComboBox: Add any event as additional parameter to onChanged callback for saving pending changes (microsoft#4594) Remove usage of Number.NaN (microsoft#4615) Update createRef to match the new React 16.3 api (microsoft#4598) Update Breadcrumb.base.tsx Fix minor typos (microsoft#4607) Remove unused variables and enable no-unused-variable (microsoft#4608) Add optional overflowIndex prop to Breadcrumb (microsoft#4609) Applying package updates. Reenable bundlesize in yaml (microsoft#4590) Fix more index imports (microsoft#4604)
Pull request checklist
$ npm run changeDescription of changes
Since the api for
React.createRefchanged from the initial PR/discussion on which we based the polyfill our version was out of sync with the recently announced version in React 16.3.This PR takes care of that and updates the
createReffunction in utilities to match the React one.Focus areas to test
(optional)