All skills
callstackincubator avatar

/react-native-tv-best-practices

@fa0bad0 official

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

Use this Skill: https://skilld.dev/gh/callstackincubator/agent-skills/react-native-tv-best-practices

This session only. Nothing lands on disk.

referencesperf-network.md

≈682 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Network Performance on TV

On TV, there's no "loading spinner safety net." People expect content to instantly fill the screen. If nothing happens after a remote press, they'll assume the app froze — and press again (duplicate requests).

Quick Reference

  • Show something within 200ms of navigation — even a blurred poster or placeholder
  • Prefetch the next likely screen while current one is stable
  • Never block navigation/focus on network responses
  • Debounce input during network stalls to prevent duplicate requests

Why It's Worse on TV

  • Wi-Fi is often bad: TVs in far corners, running on 2.4 GHz with packet loss/jitter
  • Platform timeouts: Tizen aggressively kills "stuck" requests
  • Large payloads: Home screen = multiple JSON payloads + dozens of poster images
  • No background fetch: TVs don't run your app in background between sessions

Problem: Blocking Navigation

Bad:

const onRowFocus = async (rowId) => {
  const details = await fetchRowDetails(rowId); // Blocks focus
  setDetails(details);
};

User presses down, nothing highlights until network returns.

Better (optimistic UI):

const onRowFocus = (rowId) => {
  highlightRow(rowId); // Instant visual feedback
  fetchRowDetails(rowId).then(setDetails);
};

TV-Specific Checks

  1. Prefetch where it matters — Preload the next likely screen or row, then verify memory on low-end devices.

  2. Use placeholders instead of blocking — Focus movement should remain instant even when row metadata is stale or still loading.

  3. Prioritize visible content — Load the hero/current row first; defer secondary rows and rich metadata.

  4. Handle retries gracefully — Remote presses during stalls should not spam duplicate requests.

  5. Keep caches memory-aware — Cached posters plus JSON plus video buffers can create GC stutter on Fire TV and smart TVs.

Platform Quirks

  • Tizen: Requests >5 seconds can be killed without warning. Set shorter timeouts + retry logic.
  • webOS: Some models cache aggressively in firmware — add version param to URLs.
  • Fire TV: Prefetching too aggressively on slow Wi-Fi spikes memory (cached images + JSON) → GC stutter.
  • Apple TV: Fast on wired Ethernet but test on Wi-Fi too.

Optimize first paint time, not just throughput. Show something within 200ms of navigation.

Related Skills

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides comprehensive documentation and best practices for developing React Native applications for TV platforms. It contains technical guidelines for focus management, performance, and video playback without any malicious patterns, obfuscation, or unsafe code execution.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at fa0bad0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago

README badge

README badge for callstackincubator/agent-skills/react-native-tv-best-practices