mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
`delete` causes an object (in V8, and maybe other engines) to deopt to a
dictionary instead of a class. Instead of `assign` + `delete`, manually
iterate over all the properties, like the JSX runtime does.
To avoid copying the object twice I moved the `ref` prop removal to come
before handling default props. If we already cloned the props to remove
`ref`, then we can skip cloning again to handle default props.
DiffTrain build for [bfd8da807c](https://github.com/facebook/react/commit/bfd8da807c75a2d123627415f9eaf2d36ac3ed6a)