Migrating from BrightScript to Roku RSG 2.0: a practical guide to TypeScript migration
 

Shishupal Singh Shakya
By Shishupal Singh Shakya
Nov 26, 2026 6 min read

Key takeaways

  • RSG 2.0 introduces TypeScript and TSX as an additional development approach for Roku applications
  • BrightScript remains supported; migration does not require an immediate rewrite
  • BrightScript and TypeScript components can coexist within the same application 
  • Anchor nodes provide a communication bridge between the two development models 
  • Roku recommends starting with isolated components or leaf nodes in the SceneGraph hierarchy
  • Developers must review application state, focus navigation, API integration, playback and performance during migration
  • Successful migration requires functional and device-level testing, not just successful compilation

Introduction

BrightScript and XML have served as the foundation of Roku application development for years. Roku SceneGraph 2.0 (RSG 2.0) introduces TypeScript-based development to the Roku platform, allowing developers to build SceneGraph components using TypeScript and TSX while retaining compatibility with existing BrightScript and XML components.

This change creates an opportunity to modernize existing Roku applications without rewriting the entire codebase. Teams can introduce TypeScript gradually, evaluate individual modules and retain existing functionality during the transition. This guide explains how to approach a BrightScript-to-RSG 2.0 migration, understand the architectural differences and reduce implementation risks.

Understanding the architecture shift

Traditional Roku applications use BrightScript for application logic and XML for SceneGraph component definitions. RSG 2.0 introduces TypeScript, TSX and SolidJS while continuing to use SceneGraph for rendering.

The critical difference: RSG 2.0 executes TypeScript application logic in a separate Program Context using the Hermes JavaScript runtime, while SceneGraph continues to handle rendering in its own Render Context. The two contexts communicate asynchronously through anchor nodes, which connect TypeScript components to the SceneGraph hierarchy. This separation enables BrightScript and TypeScript components to coexist within the same application, allowing incremental migration without complete rewrites.

Traditional BrightScript often uses synchronous SceneGraph function calls and observeField for property changes. RSG 2.0 replaces these with SolidJS reactive primitives (createSignal, createMemo, createEffect) and async/await for asynchronous operations.

Pre-migration assessment

Before starting, conduct a thorough assessment of your existing application:

Document your architecture: Map existing SceneGraph screens, XML components, navigation flows, authentication logic, API integrations, video playback workflows, advertising integration and remote-control navigation.

Classify components into three groups:

  • Reusable components: Existing XML and BrightScript components that can continue working
  • Migratable components: Independent components that can move to TypeScript with limited changes
  • Components requiring redesign: Areas where the new architecture offers a better implementation approach

This assessment helps identify low-risk starting points and estimate overall migration effort.

Recommended migration strategy

Step 1: Select an isolated component
Start with relatively independent modules like settings, account details, help pages or simple content details screens. Avoid highly interconnected areas like the home screen or video player initially. Roku recommends starting with leaf nodes in the SceneGraph hierarchy, then working upward toward more complex parts.

Step 2: Set up the RSG 2.0 development environment
Follow the getting started guide with Roku RSG 2.0 SDK and TypeScript for setup instructions. Prerequisites include Roku OS 16.0+, Node.js 24+, and pnpm 11.

Step 3: Implement the component in TypeScript
Recreate your selected component using TypeScript and TSX. Use anchor nodes to connect the TypeScript component with the existing SceneGraph hierarchy. Validate input/output fields and event handling between the two contexts.

Step 4: Test thoroughly on devices
Test the migrated component within the existing application. Check visual appearance, focus behavior, remote-control interactions, navigation, API responses and application state. Compare behavior with the original implementation to identify regressions. Measure memory consumption, rendering performance and device responsiveness. Do not assume a successful TypeScript build guarantees equivalent runtime performance.

Step 5: Expand gradually
After validating the first component, select the next suitable module and repeat the implementation, integration and testing process.

OTT-specific considerations

OTT applications with Roku require additional validation because they combine complex interfaces, backend services and video playback workflows.

Key areas requiring individual migration plans:

  • Home screen and content rails: Review hero banners, content shelves, poster grids and scrolling. Evaluate FlexGrid where it offers practical advantages over traditional SceneGraph grids.
  • Search and discovery: Validate keyboard interactions, search suggestions, API responses and remote-control navigation.
  • Video playback: Test existing player integration, HLS and DASH streams, DRM, subtitles, audio tracks, playback events, buffering and error handling. RSG 2.0 adoption does not automatically guarantee compatibility with every existing playback integration.
  • Authentication and profiles: Recheck sign-in, sign-up, session management, profile selection and logout.
  • Backend integration: Validate authentication, API responses, timeouts, retry behavior and error handling when using asynchronous networking.

Testing and validation

A migration is not complete simply because TypeScript code compiles successfully. Use this checklist for every migrated module:

  • Component renders correctly
  • Existing application navigation continues to work
  • Remote-control interactions behave correctly
  • Focus movement and restoration work as expected
  • API requests return expected results
  • Application state remains consistent
  • Memory consumption remains within acceptable limits
  • Scrolling and animations perform correctly
  • Existing BrightScript components continue to work
  • Playback and streaming workflows remain functional
  • No new runtime errors or application exits occur
  • Target Roku devices pass regression testing

Combine automated Jest-based component testing with real-device validation, especially for remote navigation, playback and device-specific behavior.

Migration challenges and adoption considerations

Teams should account for several challenges before committing to large-scale migration:

Learning curve: BrightScript developers need to learn TypeScript, TSX and SolidJS reactive programming.

Architecture changes: The separate Program Context and Render Context introduce asynchronous communication requirements that differ from traditional synchronous BrightScript patterns.

Beta status: As of November 10, 2026, RSG 2.0 is a beta SDK. APIs and documentation may change, and applications built with the SDK cannot currently publish to the Roku Streaming Store during the beta. Roku targets general availability for Fall 2027.

Conclusion

Migrating from BrightScript to Roku RSG 2.0 provides an opportunity to modernize Roku applications through TypeScript, SolidJS and a separate application runtime. The transition does not require an immediate rewrite. BrightScript and TypeScript can coexist, allowing development teams to migrate individual components while retaining existing functionality.

A successful migration starts with an architecture assessment, moves through isolated components and anchor-node integration, and continues with functional, regression and device-level testing. An incremental migration strategy gives development teams greater control over implementation risks while creating a practical path toward modern TypeScript-based Roku development.

 

External References

  1. pnpm: Install pnpm, the fast, disk-efficient package manager used in the RSG 2.0 setup.
  2. Node.js: Learn how much JavaScript you need to know before getting started with Node.js.
  3. TypeScript: The official TypeScript site, covering the typed superset of JavaScript that RSG 2.0 now supports.
  4. Hermes: Learn about Hermes, the lightweight JavaScript engine that runs your app logic in RSG 2.0.
  5. Roku: Build your first RSG 2.0 app with Roku's official getting-started walkthrough.
  6. SolidJS: Follow the SolidJS community discussion on how its reactive model fits into Roku development.