flâneur — a map of the web's best reading

Threading Model · React Native

reactnative.dev · 370 words · saved by 1 readers

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

Explore this link on the map →

saved by