hoxyq 214868dc50 fix[ReactDebugHooks/find-primitive-index]: remove some assumptions (#29652)
Partially reverts https://github.com/facebook/react/pull/28593.

While rolling out RDT 5.2.0, I've observed some issues on React Native
side: hooks inspection for some complex hook trees, like in
AnimatedView, were broken. After some debugging, I've noticed a
difference between what is in frame's source.

The difference is in the top-most frame, where with V8 it will correctly
pick up the `Type` as `Proxy` in `hookStack`, but for Hermes it will be
`Object`. This means that for React Native this top most frame is
skipped, since sources are identical.

Here I am reverting back to the previous logic, where we check each
frame if its a part of the wrapper, but also updated `isReactWrapper`
function to have an explicit case for `useFormStatus` support.

DiffTrain build for commit https://github.com/facebook/react/commit/fb61a1b515c5ea0e31b0dac19184454a79c4baf1.
2024-05-30 15:16:49 +00:00
2023-02-20 16:27:42 +00:00
S
Description
Languages
JavaScript 67.1%
TypeScript 29.4%
HTML 1.5%
CSS 1.1%
C++ 0.6%
Other 0.2%