@amazon-devices/react-native-fast-image version 3.0.0 provides support on Vega for react-native-fast-image, which provides a performant React Native image component.
React Native’s Image component handles image caching similar to browsers. If the server is returning proper cache control headers for images, you get the built-in caching behavior you see in a browser.
You might notice:
- Flickering
- Cache misses
- Low performance loading from cache
- Low performance in general
FastImage is an Image replacement that solves these issues on other platforms besides the web.
This library is app-deployed and available to React Native for Vega apps without a separate installation process. The library is autolinking, which your app links to at runtime. The library is guaranteed to be compatible only with the version of React Native for Vega for which it’s built.
When you uplevel your app’s version of React Native for Vega, consider the best practice of upleveling its library dependencies.
Check the documentation for more information about this library and API reference: README.md.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile: -
Reinstall dependencies using the
npm installcommand.
Examples
API reference
Components
Methods
Known issues and limitations
Backward compatibility issue
-
OS from the
v0.12release isn’t compatible withamzn/react-native-fast-image(npm package) versions . -
When running an app on the
v0.12+OS (old version of the npm package), the app crashes on startup:Volta:Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'FastImageTurboModule' could not be found. Verify that a module by this name is registered in the native binary.To avoid this crash, you must rebuild it against the latest version of@amazon-devices/react-native-fast-image:-
Check that your app’s
package.jsondoesn’t hardcode an old version for fast-image. Use SemVar version^3.0.0, so that your app can pick up the latest patch. -
Delete
package-lock.jsonto remove any locked fast-image version. You can also manually delete the entry for@amazon-devices/react-native-fast-imageinpackage-lock.jsonif you’re relying on this file to lock other dependencies. -
Delete the
node_modulesfolder, so npm won’t pick up an old cached version. - Rebuild the app.
-
Check that your app’s

