code:
import React from 'react';
import RNLockScreen from 'react-native-lock-screen';
import {View} from 'react-native';
export default class extends React.Component {
render() {
return (
<View>
<RNLockScreen
type={1}
mode={0}
onCapture={lock => {
console.log('lock: ' + lock);
}}
onVerified={() => {
console.log('lock verified');
}}
// headerFragmentProps={{
// backgroundColor: '#2777ae'
// }}
lock={'1234'}
// lockLimit={6}
// backgroundImage={wallpaper}
// lockFragmentProps={{
// style: {
// backgroundColor: '#000'
// }
// }}
// pinProps={{
// confirmPin:{
// title: 'Confirm',
// style: {
// color: '#006400'
// }
// },
// // deletePin:{
// // title: 'Delete',
// // style: {
// // color: '#006400'
// // }
// // },
// rippleProps:{
// rippleColor: '#8b0000'
// },
// containerStyle:{
// backgroundColor: 'transparent'
// },
// textStyle:{
// color: '#000'
// },
// suggestionStyle: {
// color: '#989889'
// },
// alphabetPinSuggestion: true
// }}
/>
</View>
);
}
}
error message:
E/ReactNativeJS: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
code:
error message: