3 ms·
Other commenters beat me to it, but yeah, it's an ergonomics thing. If you have multiple sounds, you can do: const [playBell, bellOptions] = useSound(); const
by joshwcomeau 7y ago
Other commenters beat me to it, but yeah, it's an ergonomics thing. If you have multiple sounds, you can do:
const [playBell, bellOptions] = useSound();
const [playBoom, boomOptions] = useSound();
It follows the convention of other React hooks, like useState.