dillon1000/react

Commit

Fixed incorrect value returned as public instance from reconciler (#26283)

## Summary

A few methods in `ReactFiberReconciler` are supposed to return
`PublicInstance` values, but they return the `stateNode` from the fiber
directly. This assumes that the `stateNode` always matches the public
instance (which it does on Web) but that's not the case in React Native,
where the public instance is a field in that object.

This hasn't caused issues because everywhere where we use that method in
React Native we actually extract the real public instance from this
"fake" public instance.

This PR fixes the inconsistency and cleans up some code.

## How did you test this change?

Existing tests.
Browse files
Changed paths7 files
First-parent comparison
M packages/react-native-renderer/src/ReactFabric.js ModifiedM packages/react-native-renderer/src/ReactFabricHostConfig.js ModifiedM packages/react-native-renderer/src/ReactNativeFiberHostComponent.js ModifiedM packages/react-native-renderer/src/ReactNativeHostConfig.js ModifiedM packages/react-native-renderer/src/ReactNativeRenderer.js ModifiedM packages/react-native-renderer/src/ReactNativeTypes.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…