Skip to content

Commit 68c8772

Browse files
committed
chore: adding audio context out of render
1 parent eefe6ad commit 68c8772

File tree

1 file changed

+2
-1
lines changed
  • workspaces/simon-game/src/app/components

1 file changed

+2
-1
lines changed

workspaces/simon-game/src/app/components/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import playSound from "../util/playSound.ts";
44

55
import { Box } from "./Box.tsx";
66

7+
let audioContext: AudioContext | null = null;
8+
79
export function App() {
8-
let audioContext: AudioContext | null = null;
910
return (
1011
<div>
1112
{buttonSoundConfig.frequencies.map((freq, index) => (

0 commit comments

Comments
 (0)