0.1.1 • Published 4 years ago
react-native-alibaba-mnn v0.1.1
react-native-alibaba-mnn
It act as a bridge between JS and native mnn modules
Installation
npm install react-native-alibaba-mnn
Usage
import React from 'react';
import { Button, Alert } from 'react-native';
import { useGetNativeDataHook } from 'react-native-alibaba-mnn';
const NewModuleButton = () => {
//pass two param to native side and get data from native side
const data = useGetNativeDataHook('param1', 'param2');
const onPress = () => {
Alert.alert(data);
};
return (
<>
<Button
title="Click to invoke your native module!"
color="#841584"
onPress={onPress}
/>
</>
);
};
export default NewModuleButton;
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT