Exposes native components from the mistica-ios and mistica-android libraries to be used as react-native components
npm install mistica-react-native
Add mistica-ios dependencies in Podfile
pod 'Mistica', :git => 'https://github.com/pablords/mistica-ios.git', :branch => "podspec-support"
pod 'SDWebImage', :modular_headers => true
pod 'SDWebImageSVGCoder', :modular_headers => true
Install pod dependencies
cd ios && pod install
Add mistica-android dependencie in build.gradle
repositories {
mavenCentral()
google()
}
dependencies {
implementation "com.telefonica:mistica:11.2.2"
}
import { Button } from 'mistica-react-native';
export function App() {
const handlePress = () => {
Alert.alert('handlePress');
};
return (
<Button
style={{
width: 300,
height: 50,
position: 'absolute',
bottom: 20,
left: 35,
marginBottom: 60,
flex: 1,
}}
title="BOTAO"
onPress={handlePress}
/>
);
}
import { TextInput } from 'mistica-react-native';
export function App() {
const handleChangeText = (text: string) => {
console.log(text);
};
return (
<TextInput
style={{
position: 'absolute',
top: 230,
left: 15,
right: 0,
bottom: 0,
width: '90%',
}}
placeholder="Digite seu Nome"
onChangeText={handleChangeText}
/>
);
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library