This app demonstrates an end-to-end streaming-app pattern: fetch a feed, browse a grid, view details, and play video.

Purpose

This app shows how the pieces of an app fit together in the RSG 2.0 SDK, including the following:

  • Asynchronous data loading
  • A state-machine-driven UI
  • Navigation between screens
  • BrightScript interoperation for app exit

Summary

This sample covers the following patterns:

  • An onMount asynchronous fetch of a remote JSON feed, parsed into typed Row and Item models
  • An AppState signal (init, grid, detail, video) that gates which view renders through <Show>
  • Screen components: GridView, DetailView, and VideoView, plus an Overhang
  • A KeyHandler that drives back, left, and right navigation, with back at the grid emitting an exitApp output so that BrightScript can close the app

Controls

You can use these keys to navigate the app:

  • Arrow keys and OK: Navigate the grid and detail content
  • Back: Step back through screens; at the grid, exit the app

Development

To build, test, and lint the sample, run these commands:

npx rk dev          # Build + deploy to Roku device
pnpm test           # Run tests
pnpm run lint       # Lint sources

Did this page help you?