Skip to content

v4.0.2

Choose a tag to compare

@vladd-g vladd-g released this 30 Jul 19:31
· 79 commits to master since this release
af93d30

v4.0.2

✨ New Features

Flow localization

createFlowView now accepts a locale — the requested localization. The view.locale value may differ from the requested localization if that localization is not available in the flow.

import { adapty, createFlowView } from 'react-native-adapty';

const flow = await adapty.getFlow('MY_PLACEMENT');
const view = await createFlowView(flow, { locale: 'es' });

console.log(view.locale); // 'es', or the flow's default localization if the flow has no 'es'

view.present();

The same locale can be passed to the component:

<AdaptyFlowView flow={flow} params={{ locale: 'es' }} />