Method and device for transmitting native object between React Native components
An object and component technology, applied in the field of ReactNative, can solve problems such as how to manage the life cycle of native objects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0022] Such as figure 1 and figure 2 As shown, the method for transferring native objects between React Native components disclosed in this embodiment includes: Step S2: the memory data management module transfers the first React Native component (such as figure 2 The native object to be boxed in the React Native component A) is packaged as a boxed object of a general type; Step S4: the first React Native component sends the boxed object to the javascript business logic module; Step S5: the second React Native component ( Such as figure 2 The react native component B) receives the boxed object forwarded by the javascript business logic module; step S6: the memory data management module unboxes the boxed object to obtain the native object.
[0023] In this embodiment, by encapsulating the memory data management module on the native end, the encapsulation and unboxing operations of the native objects to be boxed are realized, and the transfer of the native objects that cann...
no. 2 example
[0026] Such as figure 2 As shown, on the basis of the first embodiment, step S2: the memory data management module converts the first ReactNative component (such as figure 2 After the native object to be boxed in React Native component A) in React Native component is encapsulated into a boxed object of general type, the method for transferring native objects between React Native components in this embodiment also includes: Step S3: saving the box to be boxed A strong reference to the native object. The purpose of this embodiment is that when boxing, the memory data management module retains a strong reference to the native object to be boxed to prevent the native object from being released.
[0027] Further, step S3: After saving the strong reference of the native object to be boxed, the method for transferring native objects between ReactNative components in this embodiment further includes: Step S8: the javascript business logic module sends a release command to the memor...
no. 3 example
[0029] Such as figure 2 As shown, on the basis of the first embodiment and the second embodiment, step S2: the memory data management module converts the first React Native component (such as figure 2 Before the native object to be boxed in the React Native component A) is packaged as a generic type of boxed object, the method for transferring native objects between React Native components in this embodiment also includes: the first React Native component calls memory A boxing method of the data management module; correspondingly, step S6: before the memory data management module unboxes the boxed object to obtain the native object, the method for transferring the native object between React Native components in this embodiment also includes : the second React Native component (like figure 2 The ReactNative component in B) calls the unboxing method of the memory data management module.
[0030] In this embodiment, a memory data management module is established on the nati...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com