React & React Native

JS thread & UI thread

Në shqip: Thread-i i JavaScript-it dhe i ndërfaqes

ShpjegimiSQ

Në React Native, JavaScript-i punon në një thread, dhe ndërfaqja vendase në një tjetër. Nëse e bllokon thread-in e JS me punë të rënda, butonat dhe animacionet ngecin. Reanimated i ekzekuton animacionet direkt në thread-in e ndërfaqes.

EnglishEN

In React Native, JavaScript runs on one thread and the native interface on another. Block the JS thread with heavy work and buttons and animations stutter. Reanimated runs animations directly on the UI thread.

Si ta mendosh

Si dy kuzhinierë: njëri përgatit (JS), tjetri shërben (UI) — po u ngec i pari, pjatat vonohen.

Lexoje në anglisht

Like two cooks: one prepares (JS), one serves (UI) — if the first gets stuck, the plates are late.

Terma të lidhur