๋ชฉ๋กreact-webcam (1)
๐ค ์์งlog ๐ค
import { useCallback, useRef, useState } from "react"; import Webcam from "react-webcam"; import styled from "styled-components"; const CustomWebcam = () => { const webcamRef = useRef(null); const [imgSrc, setImgSrc] = useState(null); const [mirrored, setMirrored] = useState(true); const capture = useCallback(() => { if (webcamRef.current) { const imageSrc = webcamRef.current.getScreenshot(); se..
๐ React
2023. 10. 19. 14:25