{"repo":"voize-gmbh/reakt-native-toolkit","free":true,"listed":false,"github":"https://github.com/voize-gmbh/reakt-native-toolkit","clone":"git clone https://github.com/voize-gmbh/reakt-native-toolkit.git","description":"Combine React Native with Kotlin Multiplatform (KMP)","language":"Kotlin","stars":180,"topics":["kotlin","kotlin-multiplatform-mobile","react","react-native","kotlin-multiplatform"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"reakt-native-toolkit This toolkit allows you to combine React Native with Kotlin Multiplatform (KMP) by generating native modules for iOS and Android from Kotlin common code and supplying you with utilities to expose Kotlin Flows directly to React Native. Installation Prerequisite: Your project must be a Kotlin Multiplatform project, see our guide on how to setup Kotlin Multiplatform in your existing React Native project. Starting with kotlin 1.9.0 your project must have android and ios targets configured. The toolkit was tested with React Native 0.69 and 0.72 but may work with other versions as well. Add the KSP gradle plugin to your multiplatform project's build.gradle.kts file, if you have subprojects, add it to the subject project's build.gradle.kts file. Then add the reakt-native-toolkit to the commonMain source set dependencies. Also add the generated common source set to the commonMain source set: Then add reakt-native-toolkit-ksp to the KSP configurations: And configure the ksp task dependencies and copy the generated typescript files to your react native project: Add copyGeneratedTypescriptFiles task as a dependency to your react native bundle task: In the project that consumes the module, the generated TypeScript files require the JavaScript utilities, such as useFlow : Usage Native Module generation To generate a native module, annotate a Kotlin class in the commonMain source set with @ReactNativeModule and add the @ReactNativeMethod annotation to the methods you w","default_branch":null,"files":null,"tree":[],"storefront":"/r/voize-gmbh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/voize-gmbh/reakt-native-toolkit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}