dillon1000/react

Commit

React.pure automatically forwards ref (#13822)

We're not planning to encourage legacy context, and without this change, it's difficult to use pure+forwardRef together. We could special-case `pure(forwardRef(...))` but this is hopefully simpler.

```js
React.pure(function(props, ref) {
  // ...
});
```
Browse files
Changed paths2 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-reconciler/src/__tests__/ReactPure-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…