Closed farwayer closed 4 years ago
Given that Reflect
can be polyfilled I don't think we are going to roll back this change, sorry. The same problem is with IE11 which needs polyfill almost for everything anyway.
In this very specific case (
https://github.com/mobxjs/mobx-react-lite/blob/ef91cca9d5fbb09ceaca286d2e21e9549cd19801/src/observer.ts#L91)
it seems that condition is not needed anyway, since we are already looping
the own
properties, so has
must always return true here?
On Mon, Apr 6, 2020 at 6:48 PM Daniel K. notifications@github.com wrote:
Given that Reflect can be polyfilled I don't think we are going to roll back this change, sorry. The same problem is with IE11 which needs polyfill almost for everything anyway.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react-lite/issues/270#issuecomment-609941570, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBHAGR7WO6TISYXPXOLRLIIYJANCNFSM4MCMROUQ .
@mweststrate Hm, Object.keys
returns own properties only? That's a new thing for me. I suppose it would make sense then given it's the only occurrence.
Yep, Object.keys
returns keys for object own props only. And in any way you can't check own property with Reflect.has
because it uses whole prototype chain.
Alright, published 2.0.3 without Reflect
.
Next hermes version will support proxies and reflection. But current is not.
Reflect
used only once in code: https://github.com/mobxjs/mobx-react-lite/blob/45a58c42bdc4a511d55a512474fd34c4ca3afbcf/src/observer.ts#L91 Can we avoid using it at least until next hermes version will be shipped with React Native?