Evaluate the impact of using the bridge in React Native architecture.
4 phương ánCó giải thích
Các phương án trả lời
Chọn một phương ánLời giảiChọn phương án để mở
Đáp án đúng: "It converts JS code into native parts and vice versa.". Trong kiến trúc cũ, bridge (cầu nối) là kênh bất đồng bộ giữa thread JavaScript và phía native: lời gọi và mô tả giao diện từ JavaScript được tuần tự hoá thành JSON rồi chuyển sang để phía native dựng view thật hay gọi API hệ thống, còn sự kiện chạm và kết quả từ native đi theo chiều ngược lại; đây là ý của việc chuyển đổi qua lại giữa hai phía. "It simplifies the codebase." không phải tác động của bridge, nó còn thêm một lớp trung gian và chi phí tuần tự hoá. "It reduces the need for native modules." sai vì chính nhờ bridge mà native module mới gọi được từ JavaScript. "It eliminates the need for a JavaScript thread." sai vì bridge nối tới thread JavaScript chứ không thay thế nó.
Cùng chương 1
Ordering steps in the process of how React Native works in Bridge architecture:
1.The main cable starts working and starts loading JavaScript loads
2.Produces a new DOM (structure) and sends changes to Shadow cable
3.If the JavaScript code is successfully uploaded, the main thread sends it to another JavaScript thread
4.Main thread is able to render something on the screen
5.The shadow string calculates the structure and sends the parameters/properties of the structure to the main sequenceCó lời giảiCâu hỏiReact Native uses the following tech stack to build cross-platform native apps:Có lời giảiCâu hỏiHow does React Native differ from React.js in terms of rendering components?Có lời giảiCâu hỏiCả 54 câu của chủ đề54 câu