2. Setup your Prefab
After setting up your nexus private repository, you can use our prefabs in your React Native project by following the next steps:
- Run
npm i --save @infinant/retail-ao-prefab-react-component@0.0.24
to get this specific version ornpm i --save @infinant/retail-ao-prefab-react-component@latest
to get the latest version. You can also use it withyarn
orpnpm
. - Make sure you're using the right version of the component.
- Add to your source code by importing it:
import { RetailAccountOpenningPrefab } from "@infinant/retail-ao-prefab-react-component";export function PrefabPage() {return <RetailAccountOpenningPrefabenvironment="ENVIRONMENT"productCode="DD100"productSubcode=""customerId="1234"clientId="CLIENT_ID"clientSecretKey="CLIENT_SECRET_KEY"/>;}
- Replace
ENVIRONMENT
with sandbox or production according to which environment you're integrating with. - Replace
CLIENT_ID
with your Client ID from Infinant Console Portal. - Replace
CLIENT_SECRET_KEY
with your Client Secret Key from Infinant Console Portal.