SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

jsx: Remove unnecessary hasOwnProperty check (#28775)

Follow up to #28768.

The modern JSX runtime (`jsx`) does not need to check if each prop is a
direct property with `hasOwnProperty` because the compiler always passes
a plain object.

I'll leave the check in the old JSX runtime (`createElement`) since that
one can be called manually with any kind of object, and if there were
old user code that relied on this for some reason, it would be using
that runtime.
A
Andrew Clark committed
0b3b8a6a354b90fe76a9d82bb34487e5d2f71203
Parent: e63918d
Committed by GitHub <[email protected]> on 4/8/2024, 3:12:40 PM