npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@saleassist/reels

v0.2.5

Published

React Native SDK to display shoppable video tiles from SaleAssist.

Readme

@saleassist/reels

npm version SaleAssist

React Native SDK to display shoppable video tiles from SaleAssist.
A high-performance React Native component for short-form video content with built-in engagement and conversion capabilities.


✨ Features

  • 🎥 Multiple view types: Tile, Grid, Coverflow, Story
  • 🛍️ Built-in product integration with CTAs
  • 🔄 Auto-play & looping videos
  • 📱 Cross-platform (iOS & Android)
  • 🎨 Customizable themes & layouts
  • Optimized for smooth scrolling
  • 🔧 Works with both Expo and React Native CLI

📦 Installation

React Native CLI

npm install @saleassist/reels react-native-video

npm i @gumlet/insights-react-native react-native-crypto react-native-device-info @react-native-async-storage/async-storage react-native-uuid react-native-url-polyfill --legacy-peer-deps

npx pod-install  # iOS only

Expo

npm install @saleassist/reels
npx expo install expo-video

⚠️ Troubleshooting: React Native < 0.81

If you're using React Native version 0.81 or below and encounter errors after installing react-native-video or @gumlet/insights-react-native, add this initialization code at the top of your app's entry file (e.g., index.js or App.js):

import Video from 'react-native-video';

const initVideo = () => {
  try {
    global.ReactNativeVideo = Video;
    try {
      const gumletModule = require('@gumlet/insights-react-native');
      const GumletVideo = gumletModule.default 
        ? gumletModule.default(Video) 
        : gumletModule(Video);
      global.GumletVideo = GumletVideo;
    } catch (gumletError) {
      global.GumletVideo = Video;
    }
  } catch (error) {
    console.log('RN 0.73 setup error:', error);
  }
};

initVideo();

🚀 Usage

Basic Example

import { SaleAssistReels } from "@saleassist/reels";

const App = () => {
  return (
    <SaleAssistReels
      playlistId="your-playlist-id"
      videoViewtype="tileView"
      autoPlay={true}
    />
  );
};

Advanced Example with Navigation

Handle CTA and product clicks by implementing callback functions:

import { SaleAssistReels } from "@saleassist/reels";
import { useNavigation } from '@react-navigation/native';

const YourComponent = () => {
  const navigation = useNavigation();
  
  // Extract product ID from URL pattern: "ProductDetails/abc123"
  const extractProductIdFromUrl = (url) => {
    try {
      let match = url.match(/ProductDetails\/([^\/\?#]+)/);
      return match ? match[1] : null;
    } catch (error) {
      console.error("Error extracting product ID:", error);
      return null;
    }
  };

  // Handle CTA button clicks (e.g., "Buy Now", "Shop Now")
  const handleCTAPress = (data) => {
    const { url, ctaText } = data;
    
    // Navigate to product details
    if (url && url.includes("ProductDetails/")) {
      const productId = extractProductIdFromUrl(url);
      const product = products.find((p) => p.id === productId);
      navigation.navigate("ProductDetails", { product });
    } 
    // Navigate to category page
    else if (url && url.includes("/category/")) {
      const categoryId = url.split("/category/")[1];
      navigation.navigate("Category", { category: categoryId });
    } 
    // Navigate to external URL in WebView
    else if (url) {
      navigation.navigate("WebView", { url });
    }
  };

  // Handle product tap in video
  const handleProductPress = (data) => {
    const { url, ctaText } = data;
    
    // Handle string URL with product ID
    if (url && typeof url === "string" && url.includes("ProductDetails/")) {
      const productId = extractProductIdFromUrl(url);
      const product = products.find((p) => p.id === productId);
      navigation.navigate("ProductDetails", { product });
    } 
    // Handle direct product object
    else if (url && typeof url === "object" && url.id) {
      navigation.navigate("ProductDetails", { product: url });
    } 
    // Fallback to WebView
    else if (url) {
      navigation.navigate("WebView", { url });
    }
  };

  return (
    <SaleAssistReels
      playlistId="your-playlist-id"
      videoViewtype="tileView"
      autoPlay={true}
      borderRadius={10}
      seperatorWidth={8}
      tileSize={{ width: 160, height: 250 }}
      onCTAPress={handleCTAPress}
      onProductPress={handleProductPress}
      storyCaption={true}
    />
  );
};

⚙️ Props

| Prop | Type | Default | Description | |------------------|----------|-------------------------------|------------------------------------------------------------| | playlistId ⚠️ | string | — | Required. Your SaleAssist playlist ID | | videoViewtype | string | 'tileView' | View mode: 'tileView' | 'gridView' | 'coverflowView' | 'storyView' | | autoPlay | boolean| false | Auto-play videos when visible | | borderRadius | number | 12 | Border radius for video tiles (in pixels) | | seperatorWidth | number | 16 | Space between items (in pixels) | | tileSize | object | { width: 180, height: 280 } | Dimensions of video tiles | | onCTAPress | function | — | Callback fired when CTA button is pressed | | onProductPress | function | — | Callback fired when a product is pressed | | storyCaption | boolean| true | Show/hide story captions |


📊 Analytics Disclaimer

Analytics support is currently available only for React Native CLI applications.
Expo applications do not support analytics at this time.


📸 Preview

View Types

| Tile View | Grid View | Story View | Coverflow View | |-----------|-----------|------------|----------------| | | | | |


📄 License

MIT © SaleAssist


🔗 Resources


Made with ❤️ using create-react-native-library