V2 Migration Guide

Install react-native-webview


The react-native-webview package is now a peer dependency and will need to be installed as well.

Update your imports


The package name has been updated to @evervault/react-native.

Remove top-level function calls


In the previous version, you could call init() and encrypt() directly from the package.

These functions are no longer exposed at the top level. Instead:

  • Initializing the SDK is now done via the <EvervaultProvider /> component.
  • Encrypting data is now done via the encrypt() method returned from the useEvervault hook.

Update Card props


In the previous version, you could pass styles to the <Card /> component via the style prop.

The Card component no longer renders a View, so you should move the styles to a parent or child View.

The previous version also accepted acceptedBrands via the config prop. This has been moved top-level:

Finally, the initialValue prop has been renamed to defaultValues:

Rename Card.CVC to Card.Cvc


The Card.CVC prop has been renamed to Card.Cvc.