Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52766
Changelog: [internal]
Just a minor refactor so adding more logic that should work both at Meta and in OSS is easier in the next diff
Reviewed By: christophpurrer
Differential Revision: D78741904
fbshipit-source-id: 3abda5d5b7be157bf381e26dad2fd4b064a0f556