Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalfredsson committed Aug 17, 2023
1 parent 2d1265d commit d2ee8aa
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useZxing } from "react-zxing";
export const BarcodeScanner = () => {
const [result, setResult] = useState("");
const { ref } = useZxing({
onResult(result) {
onDecodeResult(result) {
setResult(result.getText());
},
});
Expand Down Expand Up @@ -113,23 +113,34 @@ Torch support is limited to devices that support the `torch` constraint. You can
</thead>
<tbody>
<tr>
<td>onResult</td>
<td>onDecodeResult</td>
<td>function</td>
<td></td>
<td>
Called when a result is found. The result is an instance of
Called when a decode result is found. The result is an instance of
<a href="https://github.com/zxing-js/library/blob/master/src/core/Result.ts">
Result
</a>
.
</td>
</tr>
<tr>
<td>onDecodeError</td>
<td>function</td>
<td></td>
<td>
Called when an decode error is found. The error is an instance of
<a href="https://github.com/zxing-js/library/blob/master/src/core/Exception.ts">
Exception
</a>
</td>
</tr>
<tr>
<td>onError</td>
<td>function</td>
<td></td>
<td>
Called when an error is found. The error is an instance of Error.
Called when any other error occurs, e.g. when the camera stream cannot be accessed.
</td>
</tr>
<tr>
Expand Down

0 comments on commit d2ee8aa

Please sign in to comment.