Skip to content

React Native reference (@tryyoursize/react-native)

SDK@tryyoursize/react-nativev0.1.0

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.

Terminal window
npm install @tryyoursize/react-native
cd ios && pod install
import { configure } from "@tryyoursize/react-native";
await configure("pk_test_…"); // once, at startup
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.
SizeGuide The native “Size guide” button: “Size guide” → “Calculating your size…” → “Your size: M”.
Recommendation Recommendation
Appearance Appearance
TysEvent A window event, by type.

Was this page helpful?