React Native reference (@tryyoursize/react-native)
Esta página aún no está disponible en tu idioma.
A thin wrapper over the native iOS and Android SDKs: the button is the native one, the window is our window in a native sheet, and only sizes reach your JavaScript. React Native 0.73+; Expo Go is not supported (use a development build). Register ios-app://<bundle id> and android-app://<package> for your key in Studio.
Install
Section titled “Install”npm install @tryyoursize/react-nativecd ios && pod installInitialize
Section titled “Initialize”import { configure } from "@tryyoursize/react-native";
await configure("pk_test_…"); // once, at startupFunctions
Section titled “Functions”configure() |
Call once at startup with your publishable key. |
getRecommendation() |
The shopper’s recommended size for a product, in your size labels. |
addRecommendationListener() |
Calls listener now (once known) and on every change. |
addEventListener() |
Window events: ready, open, close, size (preselect it), loaderror. |
present() |
Opens the measuring / try-on window for a product. |
setAppearance() |
Live restyle (e.g. |
Components
Section titled “Components”SizeGuide |
The native “Size guide” button: “Size guide” → “Calculating your size…” → “Your size: M”. |
Recommendation |
Recommendation |
Appearance |
Appearance |
TysEvent |
A window event, by type. |
¿Te ha resultado útil esta página?
Gracias. Leemos todas las respuestas.