npm install --save react-scannable
import React, { Component } from 'react';
import { Scannable, Scanner } from 'react-scannable';
class Example extends Component {
state = {
isActive: true,
};
render() {
const active = this.state.isActive;
return (
<Scanner active={active}>
<Scannable>
<button>CLICK</button>
</Scannable>
</Scanner>
);
}
}
MIT © shayc