react-native-modern-qrscanner
Advanced tools
Comparing version 1.0.1 to 1.0.2
10
index.js
@@ -0,3 +1,9 @@ | ||
import { NativeModules } from 'react-native'; | ||
import ModernQRScanner from './src/ModernQRScanner'; | ||
import QrcodeScanner from './src/QrcodeScanner'; | ||
export default QrcodeScanner; | ||
const QRReader = (fileUrl) => { | ||
const { QRScanReader } = NativeModules; | ||
return QRScanReader.readerQR(fileUrl); | ||
}; | ||
export { ModernQRScanner, QRReader }; |
{ | ||
"name": "react-native-modern-qrscanner", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A modern-designed and powerful QR code scanner for React Native with advanced features.", | ||
"main": "index.js", | ||
"nativePackage": true, | ||
"scripts": { | ||
@@ -40,3 +41,10 @@ "test": "jest" | ||
}, | ||
"homepage": "https://github.com/npmhub90/react-native-modern-qrscanner#readme" | ||
"homepage": "https://github.com/npmhub90/react-native-modern-qrscanner#readme", | ||
"dependencies": { | ||
"prop-types": "^15.8.1" | ||
}, | ||
"devDependencies": { | ||
"react": "^18.2.0", | ||
"react-native": "^0.72.6" | ||
} | ||
} |
# react-native-modern-qrscanner | ||
# React Native Modern QR Scanner | ||
A modern-designed and powerful QR code scanner for React Native with advanced features. | ||
This project provides a modern-designed and powerful QR code scanner for React Native applications. | ||
## Features | ||
- Modern and user-friendly interface | ||
- Fast and efficient QR code scanning | ||
- Customizable styles and themes | ||
- Supports both Android and iOS devices | ||
- Easy integration into React Native projects | ||
- Scan QR codes using camera. | ||
- Integrate easily with React Native projects. | ||
- Support for Android and iOS. | ||
## Installation | ||
To install the package, run: | ||
```bash | ||
@@ -20,40 +20,34 @@ npm install react-native-modern-qrscanner | ||
## Usage | ||
or | ||
Import the `QRScanner` component in your React Native application: | ||
```javascript | ||
import QRScanner from 'react-native-modern-qrscanner'; | ||
```bash | ||
yarn add react-native-modern-qrscanner | ||
``` | ||
Then, use the component in your app: | ||
## Usage | ||
Import `ModernQRScanner` in your React Native application: | ||
```javascript | ||
<QRScanner onScanSuccess={this.handleScanSuccess} /> | ||
import { ModernQRScanner } from 'react-native-modern-qrscanner'; | ||
``` | ||
Define the callback function for successful scans: | ||
Use the component in your app: | ||
```javascript | ||
handleScanSuccess = (data) => { | ||
// Process the scanned data | ||
console.log("Scanned QR Code:", data); | ||
}; | ||
```jsx | ||
<ModernQRScanner onQRCodeScanned={(data) => console.log(data)} /> | ||
``` | ||
## Customization | ||
## Testing | ||
You can customize the scanner's appearance and behavior using various props: | ||
To test the module in your project, follow these steps: | ||
```javascript | ||
<QRScanner | ||
onScanSuccess={this.handleScanSuccess} | ||
cameraStyle={{ ... }} | ||
scannerAreaStyle={{ ... }} | ||
/> | ||
``` | ||
1. Install the module in your React Native project. | ||
2. Import and integrate `ModernQRScanner` into your app. | ||
3. Run your app on a physical device or emulator. | ||
4. Test the QR scanning functionality. | ||
## Contributing | ||
Contributions are welcome! Please open an issue or submit a pull request with any improvements or suggestions. | ||
Contributions to the project are welcome. Please fork the repository and submit a pull request with your changes. | ||
@@ -60,0 +54,0 @@ ## License |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
141970
37
930
1
2
56
1
+ Addedprop-types@^15.8.1
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact-is@16.13.1(transitive)