Skip to content

Instantly share code, notes, and snippets.

View goodpic's full-sized avatar

Jun Kaneko goodpic

View GitHub Profile
@goodpic
goodpic / ProductScanRNCamera.js
Last active April 24, 2023 11:54
RNCamera : Use the barcode scanner on React Native
import React, { Component } from 'react';
import { Button, Text, View } from 'react-native';
import { RNCamera } from 'react-native-camera';
class ProductScanRNCamera extends Component {
constructor(props) {
super(props);
this.camera = null;
this.barcodeCodes = [];
@goodpic
goodpic / HookTest.spec.ts
Created September 12, 2019 17:12
Test React Hooks with react-native-testing-library
import * as React from 'react'
import { fireEvent, render } from 'react-native-testing-library'
import { HookTest } from '../HookTest'
describe('Test Hooks', () => {
test('changeText', () => {
const { getByTestId, getByPlaceholder, queryByDisplayValue } = render(
<HookTest />)