DEV Community

davidka7
davidka7

Posted on

Use sound with hooks

First
npm install use-sound
import useSound from 'use-sound';
import someSound from '../someSound.mp3';
const playButton = () => {
const [play] = useSound(someSound);
return ;
};

Top comments (0)