This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useRef } from "react"; | |
| import VexFlow from "vexflow"; | |
| function Score({ scale }: { scale: Array<string> }) { | |
| let rendered = false; // set a flag to prevent re-rendering if aleady rendered | |
| /** | |
| * | |
| * @param notes array of notes to be renered to the score, e.g ["C", "D", "Eb", "F", "G", "G#" ...] |