Exploring Lynx.js and Its Two-Thread Runtime

Featuring
Łukasz Chludziński
Engineering Manager
@
Callstack
Kewin Wereszczyński
Software Engineer
@
Callstack

Lynx.js, a technology from ByteDance, is known for its distinctive two-thread model that splits UI work from application logic. This stream serves as a learning ground for Łukasz Chludziński and Kewin Wereszczyński as they work to understand how this model behaves in practice. With a fresh project and the official docs in hand, they begin mapping out how Lynx approaches execution and where the boundaries between threads appear.

A closer look at the two‑thread model

Lynx runs user code on a background engine, while the main thread handles UI work. This separation shapes how the application behaves from the start. As they explore component examples, the hosts notice how thread‑specific bindings show up in the API. Props like main-thread:bindscroll appear directly in autocomplete, making the thread boundary visible inside the component interface. The model encourages thinking intentionally about where logic executes.

Working through the tutorial code

The team proceeds through the official gallery tutorial, pulling in assets, reviewing JSX structure, and following how layout and CSS flow through the engine. Components look familiar, and the presence of thread‑aware props adds a new dimension to the mental model. Some steps require troubleshooting-type definitions, imports, and file placement-but each adjustment reveals more of how Lynx expects projects to be organized.

Understanding how interactions flow

As they build up the example, the role of main‑thread bindings becomes easier to see. Interactions that need direct access to UI state rely on main‑thread directives, while everything else stays on the background thread. Seeing these decisions in context helps clarify how developers reason about interaction timing and responsiveness in Lynx.

What comes next

This session establishes the foundation for understanding Lynx’s execution model. Part two continues the exploration, focusing on how work moves between threads and how interaction logic fits into the overall design.

Insights

Learn more about Cross-Platform

cover

Feb 27Article

Sparkling: The Missing App Layer for Lynx.js?

A hands-on look at Sparkling for Lynx.js: CLI, native navigation, and the tooling layer that turns Lynx into a full mobile app framework.

cover

Feb 12Live Stream

Sparkling: A New Framework for Lynx

Join the Lynx team live as we explore Sparkling, its boundaries with Lynx, core features, and bootstrap a project from scratch.

cover

Dec 19Article

Visualizing the Dual-Thread Model of Lynx JS

A practical look at Lynx JS’s dual-thread runtime, using real examples to show how main and background threads behave under load.

cover

Dec 2Live Stream

Two Threads of Lynx.js Part 2

Learn how Lynx.js uses a dual-threaded model, how its APIs work, and what it means for performance in this live session with Lukasz Chludzinski and Kewin Wereszczynski.

cover

Nov 20Live Stream

Introducing Solito 5 and the Web-Native Mindset

Join us on November 20 for a deep dive into Solito 5 with its creator, Fernando Rojo, and the Callstack team.

cover

Nov 7Article

Exploring Lynx JS: From Quick Start to CLI Workflows

Learn how to set up Lynx JS, explore its ecosystem, and use the Community CLI to build native apps with a familiar JavaScript workflow.

cover

Sep 19Podcast

React Native at Scale With NFL

Discover how the NFL uses React Native, Expo, and a monorepo to ship apps across iOS, Android, web, and TV with one stack.

cover

Aug 5Article

How Node-API Works in React Native: A Deep Dive

A closer look at how Node-API works in React Native, covering addon loading, bundling, the host package, and new build tools like cmake-rn and ferric-cli.

cover

Feb 7Article

Bringing WebAssembly to React Native With Polygen

Discover Polygen, a toolkit that brings WebAssembly to React Native, compiling WASM to C for near-native performance with no runtime overhead.

cover

Dec 20Article

From Native to Multiplatform Development: Unpacking Kotlin and Compose

Discover how Kotlin Multiplatform, Jetpack Compose, and Compose Multiplatform compare to React Native. Learn their roles, relationships, and use cases.

cover

Aug 7Podcast

Open Mobile Hub: Non-GMS and Cross-Platform Possibilities

When you build applications, do you ever consider users who may not have access to Google Mobile Services? They may not be your target audience now, but it's good to be aware of what options you have in store for non-GMS devices — which is exactly what we're talking about in this episode!

cover

May 31Podcast

Stepping Into New Dimension With React Native VisionOS

Try immersing yourself in the React Universe with React Native visionOS! Listen about the latest changes in the framework & watch a 3D app demo.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.