공부/TIL1 09.28. react-player, useRef, axios file, postman array 웹 기반 동영상 플레이어 : https://www.npmjs.com/package/react-player React useRef 사용 : useRef 반환 값을 담은 player 변수를 컴포넌트의 ref 프롭스에 넘겨주면, player.current 를 이용해 컴포넌트를 사용할 수 있다. const player = useRef(null); const onSeek = (seconds) => { player.current.seekTo(seconds, "seconds"); }; return ( ... ... ); axios 에서 파일 보내기 const onOk = () => { const formBody = new FormData(); const file = document.querySelector("#fil.. 2021. 9. 29. 이전 1 다음