"매 Fabric 는 React Native 의 new renderer — JSI 기반 synchronous JS↔native 의 enables". 2018-2024 에 incrementally rolled out, RN 0.74+ 에서 default. 매 legacy bridge (async JSON serialization) 의 replace, 매 concurrent React features (Suspense, Transitions) 의 mobile 의 enable.
매 핵심
매 Architecture (vs Old Bridge)
Old bridge: JS thread ↔ Native thread async JSON messages. Serialize cost, no sync calls, list jank.
Fabric: JSI (JavaScript Interface) — JS engine (Hermes) 의 C++ HostObjects 의 direct access. Sync calls, shared memory, type-safe via codegen.
매 Components
JSI: lightweight C++ API for JS engines (Hermes/JSC). 매 binding의 base.
// C++ side
runtime.global().setProperty(runtime,"nativeAdd",Function::createFromHostFunction(runtime,PropNameID::forAscii(runtime,"nativeAdd"),2,[](Runtime&rt,constValue&,constValue*args,size_t){returnValue(args[0].asNumber()+args[1].asNumber());}));