react-hook-audio-recorder
v1.0.3
Published
>
Downloads
29
Readme
react-hook-audio-recorder
Install
npm install --save react-hook-audio-recorder
Usage
import React, { Component } from 'react'
import { useRecorder } from 'react-hook-audio-recorder';
const Example = () => {
const [audioURL, isRecording, startRecording, stopRecording] = useRecorder();
return (
<div>
<p>{isRecording}</p>
<button onClick={startRecording}>
<button onClick={stopRecording}>
<audio src={audioURL} />
</div>
)
}
License
MIT © vieduogn
This hook is created using create-react-hook.