react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

chore: use @react-native/assets-registry

Open EvanBacon opened this issue 1 year ago • 3 comments

  • Metro has a single string value that it uses for registering assets, and this value isn't multi-platform.
  • When an asset is found by Metro, this value is used to register the module ID for runtime lookup in modules such as Image.
  • To support both native and web platforms in Expo CLI, we alias the resolution for react-native-webs asset registry to a shared module ID to ensure getAssetByID can find the same module that Metro uses for registerAsset here.
  • This PR simplifies the logic by using the same module as React Native.

EvanBacon avatar Jun 10 '24 14:06 EvanBacon