Threading Model · React Native
Here we define the threading model and provide some examples to illustrate thread usage of the render pipeline. React Native renderer is designed to be thread safe. At a high level thread safety is guaranteed by using immutable data structures in the internals of the framework (enforced by C++ “const correctness” feature). This means that every update in React creates or clones new objects in the renderer instead of updating data structures. This allows the framework to expose thread safe and synchronous APIs to React. The renderer uses two different threads: Let’s review the supported scenarios of execution for each phase: This is the most common scenario where most of the render pipeline happens on JavaScript thread. When there is a high priority event on the UI Thread, the renderer is able to execute all the render pipeline synchronously on the UI thread. This scenario shows the interruption of the render phase by a low priority event in the UI thread. React and the React Native ren
caution This document refers to the New Architecture, that is in active roll-out. The React Native renderer distributes the work of the render pipeline across multiple threads. Here we define the threading model and provide some examples to illustrate thread usage of the render pipeline. React Native renderer is designed to be thread safe. At a high level thread safety is guaranteed by using immutable data structures in the internals of the framework (enforced by C++ “const correctness” feature). This means that every update in React creates or clones new objects in the renderer instead…
saved by
related reading
- Blogged Answers: A (Mostly) Complete Guide to React Rendering Behavior · Mark's Dev Blogblog.isquaredsoftware.com
- New Architecture is here · React Nativereactnative.dev
- Grainradgrainrad.com
- The Conductor Rewrite: What They Changed to Make It Fastperformance.dev
- Inside look at modern web browser (part 3) | Blog | Chrome for Developersdeveloper.chrome.com
- You Might Not Need an Effect – Reactreact.dev
- The Interactive Guide to Rendering in Reactui.dev
- Implementing React from scratchrob.directory
- GitHub - pmndrs/react-three-fiber: 🇨🇭 A React renderer for Three.js · GitHubgithub.com
- Linear – The system for product developmentlinear.app
- When does React re-render components? | Felix Gerschaufelixgerschau.com
- Building Bulletproof React Components - Shu Dingshud.in