react-native-pda-scan's People
react-native-pda-scan's Issues
插件如何使用啊
你好,请问离开页面的时候,如何取消监听广播啊?
PDA scanner not working
React native version: 0.63.2
PDA scanner device: ZKC PDA3501
Event callbacks provided in the usePdaScan hook not triggering.
const {code, error} = usePdaScan({
onEvent: (code) => {
console.tron.log('usePdaScan', code);
},
onError: (error) => {
console.tron.log('usePdaScan err', error);
},
trigger: 'always', //always: An event is triggered each time the code is scanned。 change:Events are triggered when changes occur
});
Can you please help me regarding this. Your package is the only hope of solving this feature for me
大佬你这个是激光扫描吗?能不能给个qq咨询一下你
How to Use on hooks component?
This is what I do:
import React, { useEffect } from 'react';
import usePdaScan from 'react-native-pda-scan';
const ShowStatus = ({ route, navigation }) => {
useEffect(() => {
usePdaScan({
onEvent: (code) => {
console.log('usePdaScan', code);
},
onError: (error) => {
console.log('usePdaScan err', error);
},
trigger: 'always',
});
}, []);
return (
// JSX component
);
};
export default ShowStatus;
this is the error I got
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.