DyScan
Search…
Migrating from 1.0.x to 1.1.x (React Native)
In version 1.1.1 we change the way of initializing DyScan and setting up the API key.

Removing API key setter

Depending on the way which you chose to use DyScan, you will need to remove following lines.
DyScanModule
DyScanView
1
DyScanModule.scanCard({
2
// apiKey:'YOUR_API_KEY'
3
})
4
.then(card => {
5
6
})
7
.catch(() => {
8
9
})
Copied!
1
render() {
2
return (
3
<View>
4
<DyScanView
5
onCardScanned={this.onCardScanned}
6
// apiKey={'YOUR_API_KEY'}
7
/>
8
</View>
9
);
10
}
Copied!

Initializing DyScan

In your App.js add the following line to configure DyScan.
1
import React from 'react';
2
import {DyScan} from '@dyneti/react-native-dyscan';
3
4
const App: () => React$Node = () => {
5
6
DyScan.init({
7
apiKey: 'YOUR_API_KEY',
8
});
9
10
// some code here
11
};
12
13
export default App;
Copied!