Skip to Content

⭐ Favorite Screen

An example implementation of the WatchLater component, customized to render user-marked favorite content in an OTT app. This screen is responsive, theme-aware, and handles loading, empty states, and item interactions seamlessly.


✨ Features

  • 📃 Lists favorite content in detailed view
  • ⏳ Built-in skeleton loader while fetching
  • 🖼️ Thumbnail, title & meta for each item
  • 🔍 Search icon in the header
  • 🧠 Smooth data fetching using React Query
  • 📱 Safe for all screen notches with SafeAreaWrapper

📸 Preview

Favorite Light Preview
Favorite Dark Preview

📡 API Call Methods

⚙️ First, set up the getZezoOtt API client: API Client Setup

🧪 The following API methods are used to fetch user favorite content:


🚀 Usage Example

FavoriteScreen.tsx
import React from "react"; import { WatchLater, SafeAreaWrapper, } from "@zezosoft/zezo-ott-react-native-ui-kit"; const FavoriteScreen = () => { return ( <SafeAreaWrapper> <WatchLater title="Favorite" data={[]} // ← Replace with API response from getZezoOtt().favorites.get() viewMode="detailed" onPressItem={(item) => console.log("Item pressed:", item)} onSearchPress={() => console.log("click")} showSearchIcon={true} skeletonCount={6} noDataText="No favorites found" onBackPress={() => console.log("Back pressed")} onEndReached={() => console.log("Reached end")} onEndReachedThreshold={0.5} spacing={10} itemDimension={130} contentContainerStyle={{ paddingBottom: 100, paddingHorizontal: 10 }} listStyle={{ marginTop: 10 }} titleStyle={{ fontSize: 18, fontWeight: "bold" }} /> </SafeAreaWrapper> ); }; export default FavoriteScreen;

⚙️ Props in Use

PropTypeDescription
titlestringTitle of the screen
dataarrayList of favorite items from API
isLoadingbooleanShows loading skeleton if true
viewModestringLayout mode: ‘detailed’ or ‘grid’
onPressItemfunctionCalled when an item is tapped
onSearchPressfunctionCalled when search icon is tapped
themeobjectOptional theme override
showSearchIconbooleanShow or hide search icon
skeletonCountnumberNumber of skeleton items while loading
noDataTextstringText to display when there’s no content
onBackPressfunctionCallback for back navigation
onEndReachedfunctionCalled when user scrolls to end of list
onEndReachedThresholdnumberTrigger distance from end of list
spacingnumberSpace between items
itemDimensionnumberWidth of each item in grid
contentContainerStylestyleCustom style for content wrapper
listStylestyleExternal styling for the list
titleStylestyleCustom style for title text

🖱️ User Interaction

onPressItem={item => { console.log('Item pressed:', item); }} onSearchPress={() => console.log("click")}
  • Handle item taps and trigger navigation.

✅ Summary

  • ♻️ Reuses WatchLater UI with different title and API
  • 🧠 Fetches data efficiently with React Query
  • 🎨 Supports theme, layout, and loading state
  • 🧩 Integrates smoothly into any screen

✍️ Created by Naresh Dhamu – Powered by ZezoSoft

Last updated on